--- Mer 25/8/10, Carnë Draug ha scritto: > Hi > > I can confirm that. I don't know if the octave's corr2 is > supposed to > work differently than matlab's corr2 (although the > description in the > link you gave is similar to the one in corr2 help text). > The following > code gives a matrix, not a scalar > > a = rand(5); > b = rand(5); > r = corr2(a,b) > > > On 20 August 2010 20:08, ykrsch k <ykr...@gmail.com> > wrote: > > Hi, I'm new to the Octave but trying hard to migrate > on it. I found that > > I've got a different result when I'm running "corr2" > function in MATLAB and > > Octave. > > > > I use the same size of two matrices and then used as: > > > > R = corr2(matrixA, matrixB); > > > > in MATLAB R is one correlation coefficient just > > as:http://www.mathworks.com/access/helpdesk/help/toolbox/images/corr2.html. > > > > However, when I run the same script in Octave, the > answer turns out to be a > > matrix. For example is I used 5000x600 matrix, the R > is 600x600. > > > > I'd very much appreciate if anyone can explain to me > why this is happening. > > > > Thanks in advance, > >
I guess that to replicate Matlab you need to call corr2(a(:),b(:)) as for cov http://octave.sourceforge.net/nan/function/cov.html Marco ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev