| Contents | Index |
V = var(DMObj)
V = var(DMObj, Flag)
V = var(DMObj, Wgt)
V = var(..., Dim)
V = var(..., Dim, IgnoreNaN)
| DMObj | DataMatrix object, such as created by DataMatrix (object constructor). |
| Flag | Scalar specifying how to normalize the data. Choices are:
N = the number of elements in each column or row, as specified by Dim. For more information on the normalization equations, see the MATLAB function std. |
| Wgt | Weight vector equal in length to the dimension over which var operates (specified by Dim. It is used to compute the variance. |
| Dim | Scalar specifying the dimension of DMObj to calculate the variances. Choices are:
|
| IgnoreNaN | Specifies if NaNs should be ignored. Choices are true (default) or false. |
| V | An unbiased estimator of the variance within the columns or rows of a DataMatrix object. It can be either of the following:
|
V = var(DMObj) returns the variance values of the elements in the columns of a DataMatrix object, treating NaNs as missing values. The data is normalized using a sample size of N – 1, where N = the number of elements in each column. V is a row vector containing the variance values for elements in each column in DMObj. The variance is the square of the standard deviation.
V = var(DMObj, Flag) specifies how to normalize the data. If Flag = 0, normalizes using a sample size of N – 1. If Flag = 1, normalizes using a sample size of N. N = the number of elements in each column or row, as specified by Dim. For more information on the normalization equations, see the MATLAB function std. Default Flag = 0.
V = var(DMObj, Wgt) computes the variance using Wgt, a weight vector whose length must equal the length of the dimension over which var operates (specified by Dim). All elements in Wgt must be nonnegative. The var function normalizes Wgt to sum of 1.
V = var(..., Dim) returns the variance values of the elements in the columns or rows of a DataMatrix object, as specified by Dim. If Dim = 1, returns V, a row vector containing the variance values for elements in each column in DMObj. If Dim = 2, returns V, a column vector containing the variance values for elements in each row in DMObj. Default Dim = 1.
V = var(..., Dim, IgnoreNaN) specifies if NaNs should be ignored. IgnoreNaN can be true (default) or false.
DataMatrix | mean | median | std

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |