inquire.m

来自「MATLAB中读写、处理科学数据文件格式NETCDF的程序」· M 代码 · 共 30 行

M
30
字号
function theResult = inquire(self)

% netcdf/inquire -- Deep inquiry of a netCDF file.
%  inquire(self) returns self, a netcdf object, after
%   updating its fields with the results of a deep inquiry
%   into all of its dimensions, variables, and attributes.

if nargin < 1, help(mfilename), return, end

result = [];

[ndims, nvars, ngatts, theRecdim, status] = ncmex(id(self));

if status ~= 0
   warning(' ## ' mfilename ' failure.')
   return
end

% Variables.

theVars = cell(nvars, 1);
for theVarid = -1:nvars-1
   theVars{i} = ncvar(id(self), theVarid);
end

self = var(self, theVars);
result = self;

if nargout > 0, theResult = result; end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?