Home > vbmeg > functions > common > utility > vb_corr_base.m

vb_corr_base

PURPOSE ^

Baseline correction (for VBMEG version 0.5)

SYNOPSIS ^

function bexp_new = vb_corr_base(parm)

DESCRIPTION ^

 Baseline correction (for VBMEG version 0.5)

 --- Syntax
 vb_corr_base(parm)

 --- Input
 parm.bexp      : MEG time course
 parm.Twin      : Time window for 

 --- Note
 Temporal mean of signal within the temporal window is subtracted
 from corresponding sensor. 

 --- Example
 >> parm.Twin = [1 100]; % in sampling frame
 >> parm.bexp = vb_load_meg_data(megfile)
 >> bexp_new = vb_corr_base(parm);

 --- History
 Taku Yoshioka 2007-01-12

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function bexp_new = vb_corr_base(parm)
0002 % Baseline correction (for VBMEG version 0.5)
0003 %
0004 % --- Syntax
0005 % vb_corr_base(parm)
0006 %
0007 % --- Input
0008 % parm.bexp      : MEG time course
0009 % parm.Twin      : Time window for
0010 %
0011 % --- Note
0012 % Temporal mean of signal within the temporal window is subtracted
0013 % from corresponding sensor.
0014 %
0015 % --- Example
0016 % >> parm.Twin = [1 100]; % in sampling frame
0017 % >> parm.bexp = vb_load_meg_data(megfile)
0018 % >> bexp_new = vb_corr_base(parm);
0019 %
0020 % --- History
0021 % Taku Yoshioka 2007-01-12
0022 %
0023 % Copyright (C) 2011, ATR All Rights Reserved.
0024 % License : New BSD License(see VBMEG_LICENSE.txt)
0025 
0026 bexp_new = zeros(size(parm.bexp));
0027 T = size(parm.bexp,2);
0028 
0029 for i=1:size(parm.bexp,3)
0030   tmp = parm.bexp(:,parm.Twin(1):parm.Twin(2),i);
0031   tmp = mean(tmp')';
0032   bexp_new(:,:,i) = parm.bexp(:,:,i)-repmat(tmp,[1 T]);
0033 end
0034

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005