corr2 each row

2 次查看(过去 30 天)
who
who 2017-2-3
Hi, I have data A with 1000x100 and data B with 1000x50 and I want to calculate the correlation coefficient for each row. Currently I am calculating the coefficient in this way:
for i=1:50
for j=1:100
result(j,i)=corr2(A(:,j),B(:,i))
end
end
Because processing lots of data, I wonder, if there is a faster way to do this?

采纳的回答

Andrei Bobrov
Andrei Bobrov 2017-2-3
编辑:Andrei Bobrov 2017-2-3
result = corr(A,B);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by