Ronan Reilly wrote: > v1 =: 54.735 31.069 _79.616 _22.279 _76.028 _42.021 _34.925 _44.066 _53.706 > dxVect =: +/\ _1, 60 $ 2 % 60 > calcCost =: [: +/ [: *: ] * _1&> + 1&<
I'd be tempted to rephrase some of that: dxVect=:(%~i:)30 calcCost=: [: +/ *: * 1 < | But these minor changes do not change the result. Note that in this context calcCost is just sum of squares. *./1<|(|. v1) p. dxVect 1 Oh, and dxVect in your J program corresponds to x in your C program -- so maybe it should instead be named xVect (assuming a name is meaningful)? But that's as far as I got. I'm not thinking about this very clearly. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
