Dylan Beaudette wrote:
> The source code for the algorithm is given in Matlab source[2]. I have
> tried unsuccessfully to port the code to R, mostly because I do not
> completely understand several of the matlab matrix idioms used in the
> code.


what are you stuck on in particular?

you can install GNU Octave to play around with Matlab-like syntax.


dot-before-operator (e.g. ".*") for array multiplication might be a little
confusing, it does like:

>> a = [ 1 2 ]
>> b = [ 10 20 ]
>> a .* b
ans =
    10    40

>> a * b'
ans =
    50

( ' transposes array from 1x2 to 2x1)



Hamish



      

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to