photo

francisco


自 2013 起处于活动状态

Followers: 0   Following: 0

消息

I need to check if a variable name exist in a netcdf file. Is there a way to do this without creating a list variable names and searching it entry by entry in a loop?

I think I can catch it with the warnings produced:

Error using netcdflib
The NetCDF library encountered an error during execution of 'inqVarID' function - 'Variable not found (NC_ENOTVAR)'.

Error in netcdf.inqVarID (line 22)
varid = netcdflib('inqVarID', ncid, varname);

francisco's 徽章

MATLAB Answers 徽章

全部
  • First AnswerFirst Answer
    20 Jul 2017