Hi, there seem to be at least two issues here: First, you have to initialise SPM properly (set up paths, configuration, defaults etc) by running e.g. spm fmri Second, you should place the image filenames in double {'s. Otherwise MATLAB will create ....hdw as a struct array (one struct for each filename), which is not what you want. See the MATLAB help on 'struct' for details. Volkmar Am Sonntag, den 25.01.2009, 20:25 -0500 schrieb Ping-Hong Yeh: > Hello SPMers, > > I am testing the HDW using spm8b, but ran into some troubles. > Here is the commands, > > clear; > > images = > {'/disk2/work/cert_bd/long_SA_15T_bp_lithium/HDW/test/ref.nii,1', ... > > '/disk2/work/cert_bd/long_SA_15T_bp_lithium/HDW/test/mov.nii,1'}; > > bias_opts = struct ('nits', 8, 'fwhm', 60, 'reg', 1e-6,'lmreg', 1e-6), > warps_opts = struct ('nits',8,'reg',4), > > matlabbatch{1}.spm.tools.hdw = struct('Subject', images, > 'bias_opts',bias_opts, 'warps_opts', warps_opts); > spm_jobman('run',matlabbatch); > > The errors read > > ??? Undefined function or method 'cfg_util' for input arguments of > type 'cell'. > > Error in ==> spm_jobman at 194 > cfg_util('runserial',mljob); > > > Thanks for help. > > ph -- Volkmar Glauche - Department of Neurology [log in to unmask] Universitaetsklinikum Freiburg Phone 49(0)761-270-5331 Breisacher Str. 64 Fax 49(0)761-270-5416 79106 Freiburg http://fbi.uniklinik-freiburg.de/