| Contents | Index |
netcdf.defVarDeflate(ncid,varid,shuffle,deflate,deflateLevel)
netcdf.defVarDeflate(ncid,varid,shuffle,deflate,deflateLevel) sets the compression parameters for the NetCDF variable specified by varid in the location specified by ncid.
This example create a variable with dimensions [1800 3600] and a compression level of 5. This results in a chunked layout that is a 10-by-10 grid.
ncid = netcdf.create('myfile.nc','NETCDF4');
latdimid = netcdf.defDim(ncid,'lat',1800);
londimid = netcdf.defDim(ncid,'col',3600);
varid = netcdf.defVar(ncid,'earthgrid','double',[latdimid londimid]);
netcdf.defVarDeflate(ncid,varid,true,true,5);
netcdf.close(ncid);This function corresponds to the nc_def_var_deflate function in the netCDF library C API.
For copyright information, read the netcdfcopyright.txt and mexnccopyright.txt files.

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 |