ensembleMetadata.dimensions
Return the dimensions associated with variables in a state vector ensemble
Syntax
Description
dimensions = obj.dimensionsdimensions = obj.dimensions(-1)
Return the names of dimensions associated with each variable in the state vector.
dimensions = obj.dimensions(v)dimensions = obj.dimensions(variableNames)
Return the names of dimensions associated with the specified state vector variables.
dimensions = obj.dimensions(…, type)dimensions = obj.dimensions(…, 0|’a’|’all’|[])dimensions = obj.dimensions(…, 1|’s’|’state’)dimensions = obj.dimensions(…, 2|’e’|’ens’|’ensemble’)
Specify the type of dimension to return for each variable. Options are all dimensions, state dimensions, or ensemble dimensions. By default, returns all dimensions for each variable.
dimensions = obj.dimensions(…, type, true|’c’|’cell’)dimensions = obj.dimensions(…, type, false|’d’|’default’)
Specify whether output should always be organized in a cell. If false (default), dimensions for a single variable are returned as a string row vector. If true, dimensions for a single variable are returned as a string row vector within a scalar cell. Dimensions for multiple variables are always returned as a cell vector of string row vectors.
Input Arguments
variableNames
v
type
[0|”all”|”a” (default)]: Returns the names of all dimensions for each variable
[1|”state”|”s”]: Returns the names of state dimensions.
[2|”ensemble”|”ens”|”e”]: Returns the names of ensemble dimensions
cellOutput
[“cell”|”c”|true]: Always returns outputs in a cell, even the dimensions for a single variable.
[“default”|”d”|false]: Dimensions for a single variable are returned directly as a string vector.