Skip to content
Snippets Groups Projects
Commit 123e1f2a authored by Olivier Sauter's avatar Olivier Sauter
Browse files

add case Attributes provided but not shot

parent 8066dd64
No related branches found
No related tags found
1 merge request!181fix reading netcdf with units not defined (e.g. fi cdf), add shot as input
Pipeline #245727 passed with stages
in 3 minutes and 6 seconds
......@@ -136,7 +136,15 @@ end
if ~isempty(allinfo.Attributes)
top_attr_names = {allinfo.Attributes(:).Name};
ij = strmatch('shot',top_attr_names,'exact');
cdf2mat_out.shot = allinfo.Attributes(ij).Value;
if ~isempty(ij)
cdf2mat_out.shot = allinfo.Attributes(ij).Value;
else
if nargin>1 && isnumeric(varargin{1})
cdf2mat_out.shot = varargin{1};
else
cdf2mat_out.shot = NaN;
end
end
else
if nargin>1 && isnumeric(varargin{1})
cdf2mat_out.shot = varargin{1};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment