[R] matrix cross product in R different from cross product in Matlab

2010-05-08 Thread Susanne Schmidt
Hi all, I have been searching all sorts of documentation, reference cards, cheat sheets but can't find why R's crossprod(A, B) which is identical to A%*%B does not produce the same as Matlabs cross(A, B) Supposedly both calculate the cross product, and say so, or where do I go wrong? R is on

Re: [R] help in matlab - r code

2010-03-29 Thread Susanne Schmidt
Dear Marta, I did it in Matlab, and fiddled around with R code until I had *almost* the same result. The "almost" is probably due to R handling the picture values (ranging from 0 to 1) differently than Matlab (ranging from 0 to 255), and simply multiplying the R picture values by 255 did NOT re