LabVIEW 2012 MathScript RT Module Help
»View Product Info
Owning Class: statistics
Requires: MathScript RT Module
y = var(x)
y = var(x, w)
y = var(x, w, d)
Computes the variance of the input elements. This function works column-wise for matrices by default.
||Specifies a matrix.
||Specifies a weight. w is a vector.
||Specifies the dimension of x across which to compute the variance if x is a matrix. d is a scalar that accepts the following values.
||Computes the variance by column.
||Computes the variance by row.
||Returns the variance of x. y is a scalar or vector.
can be in one of the following three states:
If x is a vector, w is a vector of the same size as x. If x is a matrix, w is a vector of the same size as the dimension of x across which to compute the variance. All elements in w must be greater than 0. LabVIEW normalizes w so the sum of all the elements in w is equal to 1.
w is a vector with only one element, 1. The input matrix has no weight. LabVIEW normalizes the output by the length of the input matrix.
w is a vector with only one element, 0, or w is an empty matrix. The input matrix has no weight. LabVIEW normalizes the output by the length of the input matrix minus one.
The following table lists the support characteristics of this function.
|Supported in the LabVIEW Run-Time Engine
|Supported on RT targets
|Suitable for bounded execution times on RT
X = [1, 2, 3, 4, 5, 6; 2, 4, 6, 8, 10, 12]
Y = var(X)