| Contents | Index |
nccreate(filename,varname)
nccreate(filename,varname,Name,Value)
nccreate(filename,varname) creates a scalar double variable named varname in the NetCDF file filename. If filename does not exist, nccreate creates the file using the netcdf4_classic format. To create a nonscalar variable, use the Dimensions argument.
nccreate(filename,varname,Name,Value) creates a variable named varname with additional options specified by one or more Name,Value pair arguments.
filename |
Text string specifying a NetCDF file, or the name you want to assign to a new NetCDF file. |
varname |
Text string specifying the name you want to assign to a variable in a NetCDF file. |
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
Create a new 2–D variable in a classic format file. Write data to this variable
nccreate('myncclassic.nc','peaks',...
'Dimensions',{'r' 200 'c' 200},...
'Format','classic');
ncwrite('myncclassic.nc','peaks', peaks(200));
ncdisp('myncclassic.nc');ncdisp | ncinfo | ncwrite | ncwriteschema | netcdf

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |