estimates phiwave GLM for SPM99 model FORMAT [phiwD] = estimate_wted(phiwD, params) Input phiwD - phido_99 design object (containing SPM99 design) params - struct containing fields, specifying options Only option so far: 'write_res' - if not 0, write residual images Output phiwD - estimated design object 'write_res', if 1, write residual images $Id: estimate_wted.m,v 1.6 2005/06/21 15:18:55 matthewbrett Exp $
0001 function [phiwD] = estimate_wted(phiwD, params) 0002 % estimates phiwave GLM for SPM99 model 0003 % FORMAT [phiwD] = estimate_wted(phiwD, params) 0004 % 0005 % Input 0006 % phiwD - phido_99 design object (containing SPM99 design) 0007 % params - struct containing fields, specifying options 0008 % Only option so far: 0009 % 'write_res' - if not 0, write residual images 0010 % 0011 % Output 0012 % phiwD - estimated design object 0013 % 'write_res', if 1, write residual images 0014 % 0015 % $Id: estimate_wted.m,v 1.6 2005/06/21 15:18:55 matthewbrett Exp $ 0016 0017 def_params = struct('write_res', 1); 0018 0019 if nargin < 2 0020 params = []; 0021 end 0022 0023 params = mars_struct('ffillsplit', def_params, params); 0024 0025 % get SPM design structure 0026 SPM = des_struct(phiwD); 0027 0028 % do estimation 0029 SPM = pr_estimate(SPM, [], params); 0030 0031 % We must set SPMid to contain SPM99 string in order for the mardo_99 to 0032 % recognize this as an SPM99 design 0033 SPM.SPMid = sprintf('SPM99: Phiwave estimation. phido_99 version %s', ... 0034 phiwD.cvs_version); 0035 0036 % return modified structure 0037 phiwD = des_struct(phiwD, SPM); 0038