netcdf.putVar(ncid, varid, data)
netcdf.putVar(ncid, varid, start, count, stride, data)
| Parameter | Description |
|---|---|
| ncid | Open netCDF file or group identifier. |
| varid | Variable identifier. |
| varname | Variable name. |
| xtype | netCDF datatype constant. |
| dimids | Dimension identifier or vector of identifiers. |
| data | Nelson array to write. |
| Parameter | Description |
|---|---|
| none | This function does not return a value. |
netcdf.putVar exposes low-level variable access.
Low-level start and count arguments use zero-based netCDF C indexing semantics.
filename = [tempdir(), 'help_netcdf_putVar.nc'];
ncid = netcdf.create(filename, netcdf.getConstant('NC_CLOBBER'));
dimid = netcdf.defDim(ncid, 'x', 3);
varid = netcdf.defVar(ncid, 'temperature', netcdf.getConstant('NC_DOUBLE'), dimid);
netcdf.endDef(ncid);
netcdf.putVar(ncid, varid, [1 2 3]);
netcdf.close(ncid);
| Version | Description |
|---|---|
| 2.0.0 | initial version |