How I find the correlation coefficient between two non-identical matrices?
1 次查看(过去 30 天)
显示 更早的评论
A=[1,2,3,3,4,5,6,7,8,9
1,2,3,6,5,4,8,9,8,7];
B=[1,3,4,8,10,15,18,19,20,25];
C=corr2(A,B)
-----------------------------------------------------
Error using corr2>ParseInputs (line 39)
A and B must be the same size.
Error in corr2 (line 21)
[a,b] = ParseInputs(varargin{:});
Error in Untitled (line 4)
C=corr2(A,B)
0 个评论
回答(1 个)
Totanly
2019-1-8
First of all, you have to know about the physical significance of correlation. that is if y=function(x) like equation ..means for each value of x there should be a value of y. but sometimes practically we get more values of y corresponding to each value of x. in that case number of y values should be identified.
for example
if x=distance and y=number of car covered the distance with velocities ....given in the table
in this case you can take mean (or mediun or other) of the velocities for each distance and then calculate correlation.
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!