Correlation between two vectors?

前端 未结 4 1680
轻奢々
轻奢々 2021-02-18 18:54

I have two vectors:

A_1 = 

      10
      200
      7
      150

A_2 = 
      0.001
      0.450
      0.0007
      0.200

I would like to know

4条回答
  •  遇见更好的自我
    2021-02-18 19:40

    Try xcorr, it's a built-in function in MATLAB for cross-correlation:

    c = xcorr(A_1, A_2);
    

    However, note that it requires the Signal Processing Toolbox installed. If not, you can look into the corrcoef command instead.

提交回复
热议问题