Skip to content

var

Variance.

V = var(A)
V = var(A, w)
V = var(A, w, dim)

Returns the variance of A. Same w and dim arguments as std. Equivalent to std(A, w, dim)^2.

var([2 4 4 4 5 5 7 9]) % 4
  • std — Standard deviation.
  • mean — Arithmetic mean.

Also categorized under: Range Functions / Math.