File: ResultsQueue.m

package info (click to toggle)
openems 0.0.35+dfsg.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,288 kB
  • sloc: cpp: 40,259; yacc: 580; lex: 350; makefile: 258; sh: 169; ruby: 19
file content (24 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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

for k=1:numel(queue.jobs{n}.outargs)
    varargout{k} = queue.jobs{n}.outargs{k};
end