matlab计算同行不同列的两个矩阵的相关系数。
Show older comments
求教!!
数据源:nowsl矩阵(4*18),tzsl矩阵(4*46)
计算目的:计算nowsl矩阵中每一列向量与tzsl中每一列向量的相关系数,并将相关系数(不是矩阵)返回到dist矩阵中。
问题:
for j=1:18
for i=1:46
dist(i,j)=xcorr(nowsl(:,j),tzsl(:,i));
end
end
根据以上程序,总是出现下表赋值不匹配现象,不知道怎么做?而自相关函数corrcoef返回的是一个矩阵,而不是一个数字。问下该怎么做?
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!