var

Variance

Syntax

  • V = var(M)

Input argument

  • M - a vector or matrix

Output argument

  • V - Variance of M.

Description

V = var(M) returns the variance of the elements of M along the first array dimension whose size does not equal 1.

Example

M = [4 -7 3; 1 4 -2; 10 7 9];
V = var(M)

See also

cov, mean.

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated