Skip to Main Content Skip to Search
Product Documentation

netcdf.close - Close netCDF file

Syntax

netcdf.close(ncid)

Description

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

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

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.

Examples

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 = netcdf.open('foo.nc','NC_WRITE')

netcdf.close(ncid)

See Also

netcdf.create | netCDF.open

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS