| MATLAB® | ![]() |
MATLAB provides access to more than 30 functions in the Network Common Data Form (netCDF) interface. This interface provides an API that you can use to enable reading data from and writing data to netCDF files (known as datasets in netCDF terminology).
To use these MATLAB functions, you must be familiar with the netCDF C interface. To get this information, consult the NetCDF C Interface Guide.
Note For information about MATLAB support for the Common Data Format (CDF), which is a completely separate, incompatible format, see Common Data Format (CDF) Files. |
In most cases, the syntax of the MATLAB function is similar to the syntax of the netCDF library function. The functions are implemented as a package called netcdf. To use these functions, prefix the function name with package name netcdf. For example, to call the netCDF library routine used to open existing netCDF files, use the following MATLAB syntax:
ncid = netcdf.open( ncfile, mode );
The following tables list all of the functions in the MATLAB netCDF package, grouped by category.
| netcdf | Summary of MATLAB Network Common Data Form (netCDF) capabilities |
| netcdf.abort | Revert recent netCDF file definitions |
| netcdf.close | Close netCDF file |
| netcdf.create | Create new netCDF dataset |
| netcdf.endDef | End netCDF file define mode |
| netcdf.getConstant | Return numeric value of named constant |
| netcdf.getConstantNames | Return list of constants known to netCDF library |
| netcdf.inq | Return information about netCDF file |
| netcdf.inqLibVers | Return netCDF library version information |
| netcdf.open | Open netCDF file |
| netcdf.reDef | Put open netCDF file into define mode |
| netcdf.setDefaultFormat | Change default netCDF file format |
| netcdf.setFill | Set netCDF fill mode |
| netcdf.sync | Synchronize netCDF file to disk |
| netcdf.defDim | Create netCDF dimension |
| netcdf.inqDim | Return netCDF dimension name and length |
| netcdf.inqDimID | Return dimension ID |
| netcdf.renameDim | Change name of netCDF dimension |
| netcdf.defVar | Create netCDF variable |
| netcdf.getVar | Return data from netCDF variable |
| netcdf.inqVar | Return information about variable |
| netcdf.inqVarID | Return ID associated with variable name |
| netcdf.putVar | Write data to netCDF variable |
| netcdf.renameVar | Change name of netCDF variable |
| netcdf.copyAtt | Copy attribute to new location |
| netcdf.delAtt | Delete netCDF attribute |
| netcdf.getAtt | Return netCDF attribute |
| netcdf.inqAtt | Return information about netCDF attribute |
| netcdf.inqAttID | Return ID of netCDF attribute |
| netcdf.inqAttName | Return name of netCDF attribute |
| netcdf.putAtt | Write netCDF attribute |
| netcdf.renameAtt | Change name of attribute |
![]() | ne (MException) | netcdf.abort | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |