필터 지우기
필터 지우기

Why are p-value and rho NaN when applying the function "corr"?

조회 수: 3 (최근 30일)
georgina company
georgina company 2018년 4월 27일
댓글: Ameer Hamza 2018년 4월 27일
Hi, I have two vectors and when applying [rho,pval] = corr(x,y) it returns me NaN values.
Could you please tell me what am I doing wrong or how I should interpret this result?
Thank you!
  댓글 수: 2
Pawel Jastrzebski
Pawel Jastrzebski 2018년 4월 27일
Could you share these vectors as well?
georgina company
georgina company 2018년 4월 27일
sure;
x=[0.8559 -1.9600 27.0800 22.6393 8.7826 1.9785 2.3686 6.0452 0.1713]
y=[-4.8000 -36.4900 22.6800 -22.0200 52.8900 -61.8500 33.2500 48.3500 38.8600]

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

채택된 답변

Ameer Hamza
Ameer Hamza 2018년 4월 27일
X and Y should be column vector, try
corr(x', y');
  댓글 수: 2
georgina company
georgina company 2018년 4월 27일
I have tried this option and it has worked well!
Thank you for your help!
Ameer Hamza
Ameer Hamza 2018년 4월 27일
You are welcome.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Hypothesis Tests에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by