This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Change default netCDF file format


oldFormat = netcdf.setDefaultFormat(newFormat)


oldFormat = netcdf.setDefaultFormat(newFormat) changes the default format used by netCDF.create when creating new netCDF files, and returns the value of the old format. You can use this function to change the format used by a netCDF file without having to change the creation mode flag used in each call to netCDF.create.

newFormat can be either of the following values.

'NC_FORMAT_CLASSIC'Original netCDF file format

64-bit offset format; relaxes limitations on creating very large files

You can also specify the numeric equivalent of these values, as retrieved by netcdf.getConstant.

This function corresponds to the nc_set_default_format function in the netCDF library C API. To use this function, you should be familiar with the netCDF programming paradigm. See netcdf for more information.


oldFormat = netcdf.setDefaultFormat('NC_FORMAT_64BIT');
Was this topic helpful?