how to get Pearson coefficient in the single vector not in the matrix
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
is there any possible where i can get pearson cofficient in the single vector? i have tried with the [R,P] = corrcoef(___) but it gives in matrix form
please help
댓글 수: 0
답변 (1개)
Prince Kumar
2022년 1월 25일
Hi,
Pearson coefficient measures the strength and direction of a linear relationship between two variables.
For example :
x = randn(6,1);
y = randn(6,1);
A = [x y 2*y+3];
R = corrcoef(A)
As you can see that there is a linear relation between second and third element of the A, this is information is given by "corrcoef" function.
Thus, it is not possible to capture this relation in a single vector.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!