# Statistical comparison between matrices

조회 수: 2 (최근 30일)
Arup B . 2021년 8월 12일
댓글: Sambit Supriya Dash . 2021년 8월 17일
I have a 32x30x24 velocity field matrix. I have calculated first five mode for each of the 24 - 32x30 matrix using SVD.
Now, I need to statistically compare every mode (compare between 24 first modes, 24 second modes, and so on). How do I go about this?
Thank you!

댓글을 달려면 로그인하십시오.

### 채택된 답변

Sambit Supriya Dash 2021년 8월 15일
편집: Sambit Supriya Dash 님. 2021년 8월 15일
After converting all the 24 matrices of 32x30 into 24 vectors of 960 elements each, take each vector of 960 elements and sort them.
Suppose,
A = matrix of 32x30x24
for i = 1:24
EA = A(:,:,i);
v1 = EA(:); v2 = reshape(EA,1,[]); v3 = reshape(EA,numel(EA),1); % Convert 2D mat. to vector
u = unique(v3);
n = histc(v3,u);
[n,idx] = sort(n);
freqn = v3(idx); % Most frequenting nos.
myNos(i) = freqn;
end
I am not sure, this would help or not, but surely the logic here will work to find the desired modes from the tensor (3D matrix), stored in myNos.
You may able to compare each no.
##### 댓글 수: 2표시 이전 댓글 수: 1숨기기 이전 댓글 수: 1
Sambit Supriya Dash 2021년 8월 17일

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

R2018a

### Community Treasure Hunt

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

Start Hunting!