Robert O'Boyle wrote: > It could be that the Rarg matrix in the second situation is close to > singular and that both languages are giving non-sensical results but I am > not sure. Could anyone explain the difference between what %. And Domino > are > doing?
I think they are doing the same thing and that the matrix is bad. In J, x %. y minimizes the norm of x - y mp x %. y. If we do the calculation for both results (note: data will wrap): Rarg=:11 3 $ 0.273501 33.6993 _15.6811 0.505944 50.5733 _10.6639 0.700719 52.4143 _6.45982 0.796474 47.0372 _4.393 0.861592 39.7353 _2.98746 0.905876 32.2908 _2.03162 0.935991 25.5423 _1.38161 0.95647 19.8067 _0.939561 0.970398 15.1266 _0.638949 0.979869 11.4137 _0.434517 0.98631 8.52817 _0.295493 Larg2=:0.0387946 0.0263726 0.0159726 0.0108677 0.00739584 0.00503257 0.00340808 0.00233151 0.00157923 0.00107516 0.000729004 div2=:_0.000007023400888 2.333431673e_7 _0.002473197439 mp=:+/ .* x=:Larg2 y=:Rarg d=:x-y mp x %.y d2=:x-y mp div2 +/ d*+d 3.33231e_10 +/ d2*+d2 5.26306e_10 Both of these are effectively zero when doing matrix calculations of this size. Best wishes, John Randall ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
