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

check dims before using

parent 77a983e1
No related branches found
No related tags found
1 merge request!153Add multi shot
Pipeline #195865 passed
......@@ -188,7 +188,7 @@ try
args = [{shot,data_request},varargin_eff];
end
% treat multiple shot numbers
if exist('shot') && isnumeric(args{1})
if exist('shot') && numel(args) > 0 && isnumeric(args{1})
args_in = args;
for i=1:numel(shot)
args{1} = shot(i);
......@@ -215,11 +215,13 @@ catch ME_gdat
return
end
for i=1:numel(gdat_data)
gdat_data(i).gdat_call = gdat_call;
if numel(gdat_data) > 0
for i=1:numel(gdat_data)
gdat_data(i).gdat_call = gdat_call;
end
end
if gdat_data(1).gdat_params.doplot
if numel(gdat_data) > 0 && gdat_data(1).gdat_params.doplot
try
% plot gdat_data versus 1st dim by default, if nb_dims<=2, otherwise do not plot
hhh = gdat_plot(gdat_data); % return handle to figure
......
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