Home > eeg > egis > data_utils > cal_gain.m

cal_gain

PURPOSE ^

vol_trialdata = cal_gain(trialdata,CalGain,CalZero)

SYNOPSIS ^

function vol_trialdata = cal_gain(trialdata,CalGain,CalZero)

DESCRIPTION ^

vol_trialdata = cal_gain(trialdata,CalGain,CalZero)

corrects for calibration zeros and gains returning microvolts

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function vol_trialdata = cal_gain(trialdata,CalGain,CalZero)
0002 %vol_trialdata = cal_gain(trialdata,CalGain,CalZero)
0003 %
0004 %corrects for calibration zeros and gains returning microvolts
0005 
0006 %MODIFICATION HISTORY
0007 %
0008 %    written 7/17/99 R.S.
0009 %
0010 %    modified 7/19/95 R.S. and (P.J.)
0011 %   removing bad FORTRAN related coding habits.
0012 
0013 size_trial = size(trialdata);
0014 for i=1:size_trial(2)
0015     CalGain(i) = 38/0.4883;
0016     end;
0017     
0018 CalZeros_mat = ones(size_trial(1),1)*CalZero';
0019 CalGain_mat = ones(size_trial(1),1)*CalGain';
0020 
0021 vol_trialdata = (trialdata - CalZeros_mat).*38./CalGain_mat;
0022 
0023 
0024

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003