Home > FMAToolbox > Database > BatchInfo.m

BatchInfo

PURPOSE ^

BatchInfo - Get batch job information.

SYNOPSIS ^

function info = BatchInfo(batch)

DESCRIPTION ^

BatchInfo - Get batch job information.

  USAGE

    info = BatchInfo(batch)

    batch          batch parameter returned by <a href="matlab:help StartBatch">StartBatch</a>

  OUTPUT

    info.mfile     batch function
    info.data      batch data
    info.done      whether the job has completed

  SEE

    See also StartBatch, GetBatch, CancelBatch, CleanBatches, Store, Recall.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function info = BatchInfo(batch)
0002 
0003 %BatchInfo - Get batch job information.
0004 %
0005 %  USAGE
0006 %
0007 %    info = BatchInfo(batch)
0008 %
0009 %    batch          batch parameter returned by <a href="matlab:help StartBatch">StartBatch</a>
0010 %
0011 %  OUTPUT
0012 %
0013 %    info.mfile     batch function
0014 %    info.data      batch data
0015 %    info.done      whether the job has completed
0016 %
0017 %  SEE
0018 %
0019 %    See also StartBatch, GetBatch, CancelBatch, CleanBatches, Store, Recall.
0020 %
0021 
0022 % Copyright (C) 2010-2011 by Michaƫl Zugaro
0023 %
0024 % This program is free software; you can redistribute it and/or modify
0025 % it under the terms of the GNU General Public License as published by
0026 % the Free Software Foundation; either version 3 of the License, or
0027 % (at your option) any later version.
0028 
0029 % Check number of parameters
0030 if nargin < 1,
0031     error('Incorrect number of parameters (type ''help <a href="matlab:help BatchInfo">BatchInfo</a>'' for details).');
0032 end
0033 if prod(size(batch)) ~=1 || ~isa(batch,'timer') || ~isvalid(batch) || ~strcmp(get(batch,'Tag'),'BatchJob'),
0034     error('Invalid batch job (type ''help <a href="matlab:help BatchInfo">BatchInfo</a>'' for details).');
0035 end
0036 
0037 job = get(batch,'TimerFcn');
0038 info.mfile = job{2}.mfile;
0039 info.data = job{2}.field;
0040 info.done = strcmp(lower(get(batch,'Running')),'off');
0041

Generated on Fri 16-Mar-2018 13:00:20 by m2html © 2005