How to get correlation for multiple columns
Show older comments
As Matlab newbie I'm trying to get correlation of the first column itself and all the others, but can't handle.
Error: You cannot subscript a table using linear indexing (one subscript) or multidimensional indexing (three or more subscripts). Use a row subscript and a variable subscript.
My code:
X = table(Tmin.P1,Tmin.P2,Tmin.H1,Tmin.H2,Tmin.Z1,Tmin.Z2,Tmin.S1)
for i=1, k=0
i=i+1;
k=k+1;
B(k,:)=corr(X(:,1),X(:,i));
end
Accepted Answer
More Answers (1)
Csongor Báthory
on 13 Nov 2018
0 votes
Categories
Find more on Correlation and Convolution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!