dash.stateVectorVariable.getMetadata

Return metadata along a dimension of a state vector variable


Syntax



Description

[metadata, failed, cause] = obj.getMetadata(d, grid, header)

Returns final metadata at the state or reference indices along the indexed dimension. Selects metadata from raw gridfile metadata, user-specified alternate metadata, or from the output of a conversion function, as appropriate.

In some cases, the method can fail to return the metadata. This can occur if a gridfile fails to build, or if a metadata conversion function fails. In this case, the method notes the failure and returns the cause of the failure.


Input Arguments

d

scalar linear index
The index of a dimension in the variable

grid

string scalar | scalar gridfile object
The gridfile object required to load the metadata. If grid is a string scalar, attempts to build the gridfile when gridfile metadata is required. If grid is a gridfile object, extracts metadata directly from the object without validating.

Output Arguments

metadata

[] | metadata matrix
Metadata for the dimension. If the method failed to obtain the metadata, returns an empty array.

failed

scalar logical
True if the method failed to return the metadata. Otherwise false

cause

[] | scalar MException
The cause of the metadata failure. If the metadata was returned successfully, an empty array.