Home > marsbar > examples > batch > do_bch_wrapper.m

do_bch_wrapper

PURPOSE ^

---------------------------------------------------------------

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

---------------------------------------------------------------
 Generic single analysis wrapper for SPM99 crash mode.
 Sorry, I mean SPM99 batch mode.
---------------------------------------------------------------
 The analysis parameters are specified here using the global variable
 SPM_BCH_VARS
 Fields are:
 work_dir      - work_dir
 ana_type      - number specifying analysis type
 m_file        - string giving mfile to run
 
 We have to use the global variable to pass parameters here because of
 the peculiarities of the batch mode.
---------------------------------------------------------------

 $Id: do_bch_wrapper.m,v 1.1.1.1 2004/08/14 00:07:52 matthewbrett Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %---------------------------------------------------------------
0002 % Generic single analysis wrapper for SPM99 crash mode.
0003 % Sorry, I mean SPM99 batch mode.
0004 %---------------------------------------------------------------
0005 % The analysis parameters are specified here using the global variable
0006 % SPM_BCH_VARS
0007 % Fields are:
0008 % work_dir      - work_dir
0009 % ana_type      - number specifying analysis type
0010 % m_file        - string giving mfile to run
0011 %
0012 % We have to use the global variable to pass parameters here because of
0013 % the peculiarities of the batch mode.
0014 %---------------------------------------------------------------
0015 %
0016 % $Id: do_bch_wrapper.m,v 1.1.1.1 2004/08/14 00:07:52 matthewbrett Exp $
0017 
0018 global SPM_BCH_VARS
0019 
0020 % get (and make) the subdirectory in the main directory
0021 work_dir = {SPM_BCH_VARS.work_dir};
0022 [pn1 pn2] = fileparts(work_dir{1});
0023 if ~exist(work_dir{1}, 'dir')
0024   mkdir(pn1, pn2);
0025 end
0026 
0027 analyses = struct( ... 
0028       'type',         SPM_BCH_VARS.ana_type, ... 
0029       'index',         1, ...
0030       'work_dir',     1, ...
0031       'mfile',         1 ...
0032     );
0033 
0034 type = {'model','contrasts','defaults_edit','headers',...
0035     'means','realign','normalize','smooth'};
0036 
0037 mfile = {SPM_BCH_VARS.m_file};

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019