gridMetadata.addAttributes

Add non-dimensional attributes to the metadata for a gridded dataset


Syntax



Description

obj = obj.addAttributes(fields, values)

Adds the named fields and associated values to the attributes structure of a gridMetadata object.

obj = obj.addAttributes(field1, value1, field2, value2, .., fieldN, valueN)

Uses a Name,Value syntax to add attributes


Input Arguments

fields

string vector [nFields]
A list of fields to add to the attributes structure.

values

cell vector [nFields]
The values associated with each new attributes field.

fieldN

string scalar
The name of a new field for the attributes structure. Must be a valid Matlab variable name and cannot duplicate any fields already in the attributes.

valueN

any data type
The value associated with the new attributes field.

Output Arguments

obj

gridMetadata object
The updated gridMetadata object