dash.stateVectorVariable.total

Take a total over dimensions of a state vector variable


Syntax



Description

obj = obj.total(dims, indices, omitnan, header)

Takes a total over the specified dimensions given total indices and NaN options.

obj = obj.total(dims, “none”, [], header)

Disables the total over the specified dimensions.

obj = obj.total(dims, “unweighted”, [], header)

Discards weights for weighted totals of the specified dimensions.


Input Arguments

dims

vector, linear indices [nDimensions]
The indices of the dimensions over which to take a total.

indices

cell vector [nDimensions] {[] | total indices}
Total indices for the dimensions. An empty array for state dimensions, and additive indices for ensemble dimensions.

omitnan

logical vector [nDimensions]
Whether to omit NaN elements along a total (true) or whether to include NaN (false)

Output Arguments

obj

scalar dash.*stateVectorVariable* object
The variable updated with the new total parameters.