corr2 each row

조회 수: 5 (최근 30일)
who
who 2017년 2월 3일
편집: Andrei Bobrov 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