Variance between two vectors

조회 수: 5 (최근 30일)
Stewart Tan
Stewart Tan 2019년 9월 15일
답변: John D'Errico 2019년 9월 15일
I have two vectors:
testvec1 = [4.3 9.1 3.3 7.7];
testvec2 = [8.1 3.2 5.4 8.5];
and i want to calculate the variance between the pair of vectors.

답변 (1개)

John D'Errico
John D'Errico 2019년 9월 15일
The variance between two vectors is something that seems to be a bit ambiguous in meaning. I can think f at east a couple of ways you MIGHT have intended your request.
Perhaps you are asking how to compute a covariance matrix. Such a matrix would be a symmetric 2x2 matrix, contaiining elements for the variance of each vector, as well as the covariance between the two vectors.
If that is what you want, then you should read the help for the function cov, which should be perfect.
But if you want something else, then you need to more carefully explain your need.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by