MATLAB: Getting error : Error using ==> corr at 103 X and Y must have the same number of rows.

problemsretag

if size(y,1) ~= n
error('stats:corr:InputSizeMismatch', ...
'X and Y must have the same number of rows.');

Best Answer

You called corr() with matrices that do not have the same number of rows. To change you need to make to your code is to instead call corr() with matrices that have the same number of rows.
There is not much more we can say until you show us the code you are using.
Related Question