0001 function test_vbmeg
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 proj_root = './';
0017
0018 test_parm.cortex = 'bv';
0019 test_parm.data = 'meg';
0020 test_parm.method = 'sarvas';
0021 test_parm.prior = 'fmri';
0022 test_parm.tempwin = 'single';
0023
0024
0025 V = test_job_brain(proj_root,test_parm);
0026 Vinfl = test_job_inflate(proj_root,test_parm);
0027 xxP = test_job_fmri(proj_root,test_parm);
0028 test_job_meg(proj_root,test_parm);
0029 G = test_job_leadfield(proj_root,test_parm);
0030 test_job_vb(proj_root,test_parm);
0031 test_job_vbfilter(proj_root,test_parm);
0032 Z = test_vb_calc_current(proj_root,test_parm);
0033 Z2 = test_job_current(proj_root,test_parm);
0034
0035
0036
0037
0038
0039 d = sqrt(sum(sum((Z-Z2).^2))/sum(sum(Z.^2)));
0040 disp(['Difference of vb_calc_current.m and job_current.m: ' ...
0041 sprintf('%1.3f\n',d)]);
0042
0043
0044
0045
0046
0047 filename = ['./vbmeg_result/' test_parm.cortex '_' test_parm.data '_' ...
0048 test_parm.method '_' test_parm.prior '_' test_parm.tempwin ...
0049 '.vbresult.mat'];
0050 vb_fsave(filename,'V','Vinfl','xxP','G','Z','test_parm');
0051
0052 return;