Reputation: 2593
Given two matrices A
and B
, How can I compute correlation between columns of A with columns of B in matlab?
corr()
function support the vector form, but not matrices.
Upvotes: 0
Views: 98
Reputation: 36
may be you want corr2
or you can use
A = randn(5,3);
B = randn(5,3);
C =corrcoef([A B], 'rows','complete');
C=C(size(A,1)+1:end,1:size(A,2)+1)
Upvotes: 2