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_writescript
Home > sltoolbox > ExpDL > edl_writescript.m

edl_writescript

PURPOSE ^

EDL_WRITESCRIPT Writes an EDL script

SYNOPSIS ^

function edl_writescript(filename, guid, workdir, ctrlpath, props)

DESCRIPTION ^

EDL_WRITESCRIPT Writes an EDL script 

 $ Syntax $
   - edl_writescript(filename, guid, workdir, ctrlpath, props)

 $ Arguments $
   - filename:     the filename of the destination script
   - guid:         the guid string assigned to the script
   - workdir:      the root working directory of the experiments
   - ctrlpath:     the path of control file (r.t. script's parent) 
   - props:        the properties of the experiment parameters
                   (no need of internal_index)

 $ Description $
   - edl_writescript(filename, guid, workdir, ctrlpath, props) writes the
     script according to the information provided. It will also add the
     internal index to each entry.

 $ Remarks $
   - The function will also creates the initial control file.

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

CROSS-REFERENCE INFORMATION ^

This function calls:
  • edl_initctrlfile EDL_INITCTRLFILE Creates an initial control file
  • edl_writeprops EDL_WRITEPROPS Writes the property table to XML file
  • slfilepart SLFILEPARTS Extracts a specified part of a file path string
  • raise_lackinput RAISE_LACKINPUT Raises an error indicating lack of input argument
  • sladdpath SLADDPATH Adds dirpath to precede the filenames
This function is called by:
  • edl_go EDL_GO The Top interface for doing experiments in EDL

SOURCE CODE ^

0001 function edl_writescript(filename, guid, workdir, ctrlpath, props)
0002 %EDL_WRITESCRIPT Writes an EDL script
0003 %
0004 % $ Syntax $
0005 %   - edl_writescript(filename, guid, workdir, ctrlpath, props)
0006 %
0007 % $ Arguments $
0008 %   - filename:     the filename of the destination script
0009 %   - guid:         the guid string assigned to the script
0010 %   - workdir:      the root working directory of the experiments
0011 %   - ctrlpath:     the path of control file (r.t. script's parent)
0012 %   - props:        the properties of the experiment parameters
0013 %                   (no need of internal_index)
0014 %
0015 % $ Description $
0016 %   - edl_writescript(filename, guid, workdir, ctrlpath, props) writes the
0017 %     script according to the information provided. It will also add the
0018 %     internal index to each entry.
0019 %
0020 % $ Remarks $
0021 %   - The function will also creates the initial control file.
0022 %
0023 % $ History $
0024 %   - Created by Dahua Lin, on Aug 14, 2006
0025 %
0026 
0027 %% parse and verify input
0028 
0029 if nargin < 5
0030     raise_lackinput('edl_writescript', 5);
0031 end
0032 
0033 %% Prepare elements
0034 
0035 doctag = 'ExpScript';
0036 nodetag = 'Entry';
0037 
0038 attribs.guid = guid;
0039 attribs.workdir = workdir;
0040 attribs.ctrlpath = ctrlpath;
0041 
0042 n = length(props);
0043 for i = 1 : n
0044     props(i).internal_index = i;
0045 end
0046 
0047 
0048 %% Write
0049 
0050 edl_writeprops(doctag, attribs, nodetag, props, filename);
0051 cpath = sladdpath(ctrlpath, slfilepart(filename, 'parent'));
0052 edl_initctrlfile(cpath, guid, n);
0053

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

Contact us at files@mathworks.com