[GRASS-dev] anyone interested in helping to port an algorithm from matlab?

Hamish hamish_b at yahoo.com
Wed Nov 5 19:53:40 EST 2008


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



      



More information about the grass-dev mailing list