| Contents | Index |
netcdf.defVarFill(ncid,varid,noFillMode,fillValue)
netcdf.defVarFill(ncid,varid,noFillMode,fillValue) sets the fill parameters for the NetCDF variable identified by varid. ncid specifies the location.
For netCDF-4 files, you can only specify fill values when the NetCDF is in definition mode (before calling netcdf.endDef). For NetCDF files in classic and 64-bit offset modes, you can turn no-fill mode on and off at any time.
This example creates a NetCDF file and defines a fill value for a variable.
ncid = netcdf.create('myfile.nc','NETCDF4');
dimid = netcdf.defDim(ncid,'latitude',180);
varid = netcdf.defVar(ncid,'latitude','double',dimid);
netcdf.defVarFill(ncid,varid,false,-999);
netcdf.close(ncid);This function corresponds to the nc_def_var_fill function in the NetCDF library C API.
For copyright information, read the netcdfcopyright.txt and mexnccopyright.txt files.
netcdf | netcdf.inqVarFill | netcdf.setFill

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 |