ncwrite(filename, varname, data)
ncwrite(filename, varname, data, start)
ncwrite(filename, varname, data, start, stride)
| Parameter | Description |
|---|---|
| filename | Path of the netCDF file. |
| varname | Name of the variable to update. |
| data | Nelson array written to the variable. |
| start | Optional one-based starting subscript. |
| stride | Optional positive stride vector. |
| Parameter | Description |
|---|---|
| none | This function does not return a value. |
ncwrite writes an entire variable or a hyperslab of a variable. High-level indexing uses one-based subscripts.
The data type is converted by the netCDF C library when the conversion is valid.
filename = [tempdir(), 'help_ncwrite.nc'];
nccreate(filename, 'temperature', 'Dimensions', {'x', 3});
ncwrite(filename, 'temperature', [10 20 30]);
data = ncread(filename, 'temperature')
| Version | Description |
|---|---|
| 2.0.0 | initial version |