Commit bd0b3942 authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet

bugfix for mult-instance input

parent d5405809
......@@ -50,11 +50,24 @@ else
end
if max(size(asData)) > 1
for idx = 1:numel(asData)
result(idx) = ita_extract_dat(asData(idx),varargin(2:end));
varargout{1} = result;
return;
end
for idx = 1:numel(asData)
% MMT: this seems to be the easiest way to make this work
if isnumeric(varargin{2})
optionStr = num2str(varargin{2});
else
optionStr = ['''' varargin{2} ''''];
end
for iVar = 3:numel(varargin)
if isnumeric(varargin{iVar})
optionStr = [optionStr ',' num2str(varargin{iVar})]; %#ok<*AGROW>
else
optionStr = [optionStr ',''' varargin{iVar} ''''];
end
end
eval(['result(idx) = ita_extract_dat(asData(idx),' optionStr ');']);
end
varargout{1} = result;
return;
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment