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.


Close netCDF file




netcdf.close(ncid) terminates access to the netCDF file identified by ncid.

ncid is a netCDF file identifier returned by netcdf.create or

This function corresponds to the nc_close 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.


This example creates a new netCDF file, and then closes the file. You must have write permission in your current directory to run this example.

ncid ='','NC_WRITE')

Was this topic helpful?