stateVector.weightedMean
Take a weighted mean over dimensions of variables in a state vector
Syntax
Description
Updates weighted mean settings for the listed variables. If the first input is -1, applies the settings to every variable currently in the state vector.
Takes a weighted mean over the indicated state dimension. You must provide a weight for each state index along the dimension.
Takes a weighted mean over the indicated ensemble dimension. Before using this method, you must first use the “stateVector.mean” method to provide mean indices for the ensemble dimension. You must provide a weight for each mean index.
Take a weighted mean over multiple dimensions. If the dimension list contains ensemble dimensions, you must have first called the “stateVector.mean” method on the ensemble dimensions.
Input Arguments
v
variableNames
dimensions
weights
If weights is an empty array, an unweighted mean will be taken for the dimension. Otherwise, the weights for a state dimension should have one element per state index. The weights for an ensemble dimension should have one element per mean index.
If only a single dimension is listed, you may provide the sequence indices directly as a vector, instead of in a scalar cell. However, the scalar cell syntax is also permitted.