How to find correlation coefficient between measured data and mathematically retrieved data without corr2.

조회 수: 3 (최근 30일)
I dont have image processing toolbox with my license. I m interested to find correlation coeff between two matrices.

채택된 답변

ANKUR KUMAR
ANKUR KUMAR 2017년 12월 18일
편집: ANKUR KUMAR 2017년 12월 19일
First method: Use corrcoef to find the correlation coefficient which yields a 2*2 matrix. eg.
A=corrcoef(randi(35,9,9),randi(25,9,9));
result is A=
1.0000 0.0441
0.0441 1.0000
So, you can use A(1,2) or A(2,1).
Second method: If you find the correlation, then you can use corr2(A,B), where A and B must be of equal dimension. It gives the required answer.
If you want the spatial correlation, then you can have to find correlation at every grid using the same function corr2 or you can interpolate into finer grids to get the spatial correlation.
  댓글 수: 4
Anjali Sharma
Anjali Sharma 2017년 12월 19일
Yes I too guess corrcoef will do the job. Just to cross-check can you please confirm that the correlation coefficient is same for the matrices you have taken in your example when used with corr2 (I could have done this but i can't!) Thanks in advance.
ANKUR KUMAR
ANKUR KUMAR 2017년 12월 19일
Yes, I have cross check and have a faith of MATLAB. Both yield the same answer. Please accept my answer, if it helps you.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by