Skip to content
Snippets Groups Projects
Commit dc94b0e8 authored by Antoine Merle's avatar Antoine Merle
Browse files

More compact solution

parent 63a1f4d0
Branches change_check_char_to_mds_status
Tags
1 merge request!181fix reading netcdf with units not defined (e.g. fi cdf), add shot as input
Pipeline #255008 passed
...@@ -138,15 +138,11 @@ end ...@@ -138,15 +138,11 @@ end
if ~isempty(allinfo.Attributes) if ~isempty(allinfo.Attributes)
top_attr_names = {allinfo.Attributes(:).Name}; top_attr_names = {allinfo.Attributes(:).Name};
ij = strmatch('shot',top_attr_names,'exact'); ij = strmatch('shot',top_attr_names,'exact');
if ~isempty(ij) else
cdf2mat_out.shot = allinfo.Attributes(ij).Value; ij = [];
else end
if nargin>1 && isnumeric(varargin{1}) if ~isempty(ij)
cdf2mat_out.shot = varargin{1}; cdf2mat_out.shot = allinfo.Attributes(ij).Value;
else
cdf2mat_out.shot = NaN;
end
end
else else
if nargin>1 && isnumeric(varargin{1}) if nargin>1 && isnumeric(varargin{1})
cdf2mat_out.shot = varargin{1}; cdf2mat_out.shot = varargin{1};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment