ncwriteschema(filename, schema)
| Parameter | Description |
|---|---|
| filename | Path of the netCDF file to create or update. |
| schema | Structure describing dimensions, variables, groups, and attributes. The structure can follow the shape returned by ncinfo where applicable. |
| Parameter | Description |
|---|---|
| none | This function does not return a value. |
ncwriteschema creates definitions from a schema structure.
Use it to reproduce metadata layout before writing variable data.
source = [tempdir(), 'help_ncwriteschema_source.nc'];
target = [tempdir(), 'help_ncwriteschema_target.nc'];
nccreate(source, 'temperature', 'Dimensions', {'x', 3});
info = ncinfo(source);
ncwriteschema(target, info);
copyInfo = ncinfo(target);
copyInfo.Variables(1).Name
| Version | Description |
|---|---|
| 2.0.0 | initial version |