ensembleMetadata.length
Return the lengths of a state vector and its variables
Syntax
Description
Return the total length of a state vector.
Returns the length of the specified variables in a state vector.
Input Arguments
v
0 | -1 | logical vector | vector, linear indices
Indicates which state vector lengths to return. If 0, returns the length of the total state vector. Otherwise, lists the indices of variables whose lengths should be returned. If -1, selects all variables in the state vector. If a logical vector, must have one element per variable in the state vector. Otherwise, a vector of linear indices.
variableNames
string vector [nVariables]
The names of the variables in the state vector whose lengths should be returned
Output Arguments
length
scalar positive integer
The length of the full state vector.
lengths
vector, positive integers [nVariables]
The lengths of the specified variables in the state vector.