LabVIEW 2012 MathScript RT Module Help
Edition Date: June 2012
Part Number: 373123C01
»View Product Info
Owning Class: statistics
Requires: MathScript RT Module
Syntax
y = std(x)
y = std(x, w)
y = std(x, w, d)
Description
Returns the standard deviation of a vector or matrix. This function works columnwise for matrices by default.
Details
Examples
Inputs
Name 
Description 
x 
Specifies a vector or matrix. 
w 
Specifies a weight. w is a vector. 
d 
Specifies the dimension of x across which to calculate the standard deviation if x is a matrix. d is a scalar that accepts the following values.
1 (default)

Calculates the standard deviation by column. 
2 
Calculates the standard deviation by row. 

Outputs
Name 
Description 
y 
Returns the standard deviation of x. y is a scalar or vector. 
Details
w 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 calculate the standard deviation. 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 RunTime Engine 
Yes

Supported on RT targets 
Yes

Suitable for bounded execution times on RT 
Not characterized

Examples
X = [1, 2, 3, 4, 5, 6; 2, 4, 6, 8, 10, 12]
Y = std(X)
Related Topics
var