Code covered by the BSD License  

Highlights from
Statistical Learning Toolbox

from Statistical Learning Toolbox by Dahua Lin
Functions for statistical learning, pattern recognition and computer vision, covering many topics.

Description of edl_readscript
Home > sltoolbox > ExpDL > edl_readscript.m

edl_readscript

PURPOSE ^

EDL_READSCRIPT Reads in a EDL script

SYNOPSIS ^

function script = edl_readscript(filename)

DESCRIPTION ^

EDL_READSCRIPT Reads in a EDL script

 $ Syntax $
   - script = edl_readscript(filename)

 $ Description $
   - script = edl_readscript(filename) reads in a EDL script from 
     a script xml file. The returned script is a struct with
     following fields:
       - attribs: the header attributes
           - guid:     the GUID string identifying the script
           - workdir:  the root work diretory of experiments
           - ctrlpath: the corresponding control file path
       - entries:  the experiment parameter entries
         at least have following fields:
           - internal_index:  the internal index

 $ History $
   - Created by Dahua Lin, on Aug 14, 2006

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
  • edl_batchexp EDL_BATCHEXP Performs Batch experiments according to scheme
  • edl_go EDL_GO The Top interface for doing experiments in EDL

SOURCE CODE ^

0001 function script = edl_readscript(filename)
0002 %EDL_READSCRIPT Reads in a EDL script
0003 %
0004 % $ Syntax $
0005 %   - script = edl_readscript(filename)
0006 %
0007 % $ Description $
0008 %   - script = edl_readscript(filename) reads in a EDL script from
0009 %     a script xml file. The returned script is a struct with
0010 %     following fields:
0011 %       - attribs: the header attributes
0012 %           - guid:     the GUID string identifying the script
0013 %           - workdir:  the root work diretory of experiments
0014 %           - ctrlpath: the corresponding control file path
0015 %       - entries:  the experiment parameter entries
0016 %         at least have following fields:
0017 %           - internal_index:  the internal index
0018 %
0019 % $ History $
0020 %   - Created by Dahua Lin, on Aug 14, 2006
0021 %
0022 
0023 %% Read in file
0024 
0025 doctag = 'ExpScript';
0026 nodetag = 'Entry';
0027 
0028 S = edl_readprops(filename, nodetag);
0029 
0030 %% Post-Processing
0031 
0032 % doc tag
0033 if ~strcmp(S.tag, doctag)
0034     error('edl:parseerror', ...
0035         'Invalid document tag %s for script', S.tag);
0036 end
0037 
0038 % doc attribs
0039 if isempty(S.attribs)
0040     error('edl:parseerror', ...
0041         'The document element for script has no attributes');
0042 end
0043 
0044 attrnames = {'guid', 'workdir', 'ctrlpath'};
0045 tf = isfield(S.attribs, attrnames);
0046 if ~all(tf)
0047     error('edl:parserror', ...
0048         'The required header %s does not exist', ...
0049         attrnames{find(~tf, 1)});
0050 end
0051 
0052 script.attribs = struct(...
0053     'guid', S.attribs.guid, ...
0054     'workdir', S.attribs.workdir, ...
0055     'ctrlpath', S.attribs.ctrlpath);
0056 
0057 % entries
0058 
0059 script.entries = edl_check_internalindices(S.(nodetag));
0060 
0061 
0062 
0063 
0064 
0065

Generated on Wed 20-Sep-2006 12:43:11 by m2html © 2003

Contact us at files@mathworks.com