# How to find linear correlation and how to add a horizontal average line when the dimensions of arrays being concatenated are not consistent?

조회 수: 1 (최근 30일)
Kofial 2020년 2월 11일
답변: Srivardhan Gadila 2020년 2월 17일
B4= (151.4 150.2 142.2 152.8 152.2 150.1 152.3 150.1);
B5= (547.1 548.5 548.1 544.4 531.5);
##### 댓글 수: 3이전 댓글 1개 표시이전 댓글 1개 숨기기
Kofial 2020년 2월 12일
B4 and B5 should correlate together. The numbers are just to show the size. They can be different. Like for example: B4= (151.4 150.2 142.2 152.8 152.2 150.1 152.3 150.1); B5= (151.4 150.2 142.2 152.8 152.2 150);
Rik 2020년 2월 12일
They are not paired, so they don't correlate. The whole point of correlation is that you have pairs of numbers and you can try to define a trend.
How would you do this with pen and paper? That may help us to understand what you mean and how you could implement it in Matlab.

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

### 답변 (1개)

In order to find the linear correlation between B4 and B5 they should have same number of observations/ elements.
You can also refer to the following link for other correlation functions

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

### 카테고리

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