netcdf.inqVarFill
返回 netCDF 变量的填充参数
说明
[
返回由 noFillMode
,fillValue
] = netcdf.inqVarFill(ncid
,varid
)ncid
指定的文件或组中的 varid
指定的 netCDF 变量的填充参数。
示例
获取可变填充参数
打开示例 netCDF 文件,并获取变量的填充参数。在本例中,指定的变量已启用填充模式,填充值为 -32767
。
ncid = netcdf.open("example.nc","NOWRITE"); varid = netcdf.inqVarID(ncid,"temperature"); [noFillMode,fillValue] = netcdf.inqVarFill(ncid,varid)
noFillMode = logical 0 fillValue = int16 -32767
关闭 netCDF 文件。
netcdf.close(ncid)
输入参数
ncid
— NetCDF 文件或组标识符
非负整数标量
NetCDF 文件或组标识符,指定为非负整数标量。您可以使用 netcdf.create
或 netcdf.open
函数来返回文件标识符。您可以使用 netcdf.defGrp
函数来返回组标识符。
数据类型: double
varid
— NetCDF 变量标识符
非负整数标量
NetCDF 变量标识符,指定为非负整数标量。您可以使用 netcdf.defVar
函数返回变量标识符。
数据类型: double
输出参量
noFillMode
— 填充模式的状态
1
| 0
填充模式的状态,以数据类型 logical
的 1
或 0
形式返回。值 1
表示没有为指定的变量启用填充模式。
fillValue
— 缺失值的填充值
标量
缺失值的填充值,以标量形式返回。
提示
此函数对应于 netCDF 库 C API 中的
nc_inq_var_fill
函数。
版本历史记录
在 R2010b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)