openEMS/matlab/ResultsQueue.m

25 lines
586 B
Matlab
Raw Normal View History

function [varargout] = ResultsQueue(queue, n)
% function [varargout] = ResultsQueue(queue, n)
%
% Use this function to retrieve the results from a finished queue.
%
% For more details see: InitQueue
%
% See also: InitQueue, FinishQueue, Add2Queue, RunOpenEMS
%
% openEMS matlab interface
% -----------------------
% author: Thorsten Liebig
if n>numel(queue.jobs)
error 'ResultsQueue:job is missing'
end
if (nargout>numel(queue.jobs{n}.outargs))
error 'not enough job output arguments'
end
2011-11-28 13:09:14 +00:00
for k=1:numel(queue.jobs{n}.outargs)
varargout{k} = queue.jobs{n}.outargs{k};
end