Skip to Main Content Skip to Search
Product Documentation

netcdf.inqVarFill - Determine values of fill parameters for NetCDF variable

Syntax

[noFillMode,fillValue] = netcdf.inqVarFill(ncid,varid)

Description

[noFillMode,fillValue] = netcdf.inqVarFill(ncid,varid) returns the fill mode and the fill value for the variable varid in the file or group specified by ncid.

Input Arguments

ncid

Identifier of a NetCDF file, returned by netcdf.create or netcdf.open, or a NetCDF group, returned by netcdf.defGrp.

varid

Identifier of NetCDF variable.

Output Arguments

noFillMode

Boolean value. true indicates that use of the fill values for the variable has been disabled.

fillValue

Specifies the value to use in the variable when no other value is specified and use of fill values has been enabled.

Examples

This example opens the NetCDF sample dataset and gets the fill mode and fill value used with a variable.

ncid = netcdf.open('example.nc','NOWRITE');
varid = netcdf.inqVarID(ncid,'temperature');
[noFillMode,fillValue] = netcdf.inqVarFill(ncid,varid);
netcdf.close(ncid);

References

This function corresponds to the nc_inq_var_fill function in the netCDF library C API.

For copyright information, read the netcdfcopyright.txt and mexnccopyright.txt files.

See Also

netcdf | netcdf.defVarFill | netcdf.setFill

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


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