Home > marsbar > examples > batch > run_preprocess.m

run_preprocess

PURPOSE ^

Run smoothing and SPM analysis for MarsBaR ER sample data

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Run smoothing and SPM analysis for MarsBaR ER sample data

 $Id: run_preprocess.m,v 1.2 2004/08/15 01:19:43 matthewbrett Exp $ 

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Run smoothing and SPM analysis for MarsBaR ER sample data
0002 %
0003 % $Id: run_preprocess.m,v 1.2 2004/08/15 01:19:43 matthewbrett Exp $
0004 
0005 % Start marsbar to make sure spm_get works
0006 marsbar('on')
0007 
0008 % You might want to define the path to the example data here, as in
0009 % subjroot = '/my/path/somewhere';
0010 subjroot = get_subjroot();
0011 
0012 sesses = {'sess1','sess2','sess3'};
0013 
0014 spm_v = spm('ver');
0015 sdirname = [spm_v '_ana'];
0016 if ~strcmp(spm_v, 'SPM99'), spm_defaults; end
0017 
0018 % Make sure SPM modality-specific defaults are set
0019 spm('defaults', 'fmri');
0020 
0021 % do smoothing
0022 er_smooth(subjroot, sesses, 'nu*.img', 8);
0023 
0024 % Run statistics, contrasts
0025 for ss = 1:length(sesses)
0026   model_file = configure_er_model(subjroot, sesses{ss}, sdirname);
0027   estimate_er_model(model_file, [1 0]);
0028 end

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