stateVector.sequence
Use a sequence of data along ensemble dimensions
Syntax
Description
Creates sequences for the listed variables. If the first input is -1, applies a sequence to every variable currently in the state vector.
Design sequences for the listed ensemble dimensions. Sequences are built using the provided sequence indices. Each set of sequence indices is associated with a provided set of metadata.
obj = obj.sequence(variables, dimensions, “none”)
Removes any sequences from the listed dimensions.
Input Arguments
v
variableNames
dimensions
indices
indices should be a cell vector with one element per listed dimension. Each element contains the sequence indices for the corresponding dimension or an empty array. Sequence indices are 0-indexed from the reference element for each ensemble member and may include negative values. If an element of indices contains an empty array, then any pre-existing sequences are removed for that dimension. The sequence metadata for that dimension must also be an empty array.
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.
metadata
metadata should be a cell vector with one element per listed dimension. Each element holds the sequence metadata for the correpsonding dimension. Each set of metadata must be a matrix with one row per associated sequence index. Each metadata matrix should have unique rows.
Metadata matrices may have a numeric, logical, char, string, cellstring, or datetime data type. They cannot contain NaN or NaT elements. Cellstring metadata will be converted to string. If there are no sequence indices for a dimension, then the sequence metadata for the dimension should be an empty array.
If only a single dimension is listed, you may provide sequence metadata directly as a matrix, instead of in a scalar cell. However, the scalar cell syntax is also permitted.