gridfile.expand

Increase the length of a dimension in a .grid file


Syntax



Description

obj.expand(dimension, metadata)

Increases the length of a dimension. Appends new metadata values to the existing metadata for the dimension. The number of rows in the new metadata will determine the amount by which the dimension’s length is increased.


Input Arguments

dimension

string scalar
The name of the dimension whose length should be increased. May be any recognized dimension name (See gridMetadata.dimensions for a list of recognized dimensions)

metadata

matrix, numeric | logical | char | string | cellstring | datetime
The metadata values that should be appended to the dimension. Each row is one new element along the dimension. Cellstring metadata will be converted to string.

If the dimension already exists in the .grid file, metadata must have one column per column in the existing metadata. The new metadata must also have a data type that can be appended to the existing metadata. Compatible data types are (numeric/logical), (char/string/cellstring), and (datetime).