gridMetadata.setOrder
Specify a dimension order for a gridded dataset
Syntax
Description
obj = obj.setOrder(dimensions)
Specifies an order of dimensions. Dimension order can be accessed via the .order property of a gridMetadata object. Dimensions are listed in this order when the gridMetadata object is displayed in the console. The dimension order will be deleted if the defined dimensions (dimension with metadata) change for the gridMetadata object.
obj = obj.setOrder(dimension1, dimension2, .., dimensionN)
Specify dimension order by listing dimensions as inputs, rather than as a string list.
obj = obj.setOrder(0)
Removes the dimension order (if it exists) from the current gridMetadata object.
Input Arguments
dimensions
string vector
The order of dimensions for the gridMetadata object. Can only include the names of defined dimensions (those with metadata), and must list each defined dimension exactly once.
dimensionN
string scalar
The name of a defined dimension in the gridMetadata object. The input dimension names must list each defined dimension exactly once.
Output Arguments
obj
gridMetadata object
The updated gridMetadata object. When displayed in the console, dimensions are listed in the specified order. The dimension order can also be returned via the .order property.