addDimension
Adds a both a new dimension and its associated coordinate variable to the NetCDF file.
Declaration
[dimension,variable] = addDimension(name,data,properties,dimLength)
Parameters
namestring with the name of the dimensiondataarray of values along that dimension, or emptypropertiescontainers.Map containing any key-value pairs to be associated with the dimension.dimLength(optional) length of the dimension
Returns
dimensiona NetCDFDimension object with the newly create dimensionvariablea NetCDFVariable object with the associated coordinate variable
Discussion
Usage
x = linspace(0,10,11);
ncfile.addDimension('x',x,[]);