MATLAB Answers

huda nawaf


Asked by huda nawaf
on 2 Sep 2011

hi, how I can find the correlation of an array?

I found corr, but it is find correlation between each two columns . how I can find the correlation between rows.

are there command find the correlation among more than two rows?




No products are associated with this question.

2 Answers

Answer by Paulo Silva
on 2 Sep 2011

maybe using corr on the transposed array?!

  1 Comment

on 2 Sep 2011

I think you can transpose your matrix like this
for example you have a Matrix >>X=rand(10) then >>X=X';
and then perform "corr" or "corrcoef"
like >>[R]=corrcoef (X);

Answer by huda nawaf
on 2 Sep 2011

hi, thanks, but I don't know why used rand . for what? please, be more clear


  1 Comment

Rand is just an example, just transpose your matrix.

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!