I'm trying to calculation the correlation between each individual value in each row to the corresponding row in another matrix.
I have two matrices; both same size 442×1, 442×1.
I used the following code:
DR_all_stv = 442×1 matrix
Participation_Coeff = 442×1 matrix
stv_correlation = (corr(DR_all_stv(1:442,:),Participation_Coeff(1:442,:),'all',')');
However the corresponding code just gives me one correlation value, but I want to create an array that contains a value for each correlation between each row. It should be a 1 to 1 correlation.
Does anyone have any adivce on how I can calculate each correlation between the two corresponding rows?
Best Answer