1234567891011121314 |
- function [outData] = blCorr(inData,timeWinStart,timeWinEnd)
- %DEMEAN performs baseline correction using the given time window
- % input stream is divided into trials and average voltage within the set
- % time window is calculated for each trial. Afterwards this average
- % activity is subtracted from the whole trial to normalise activity in
- % set time window to 0.
- % calculate average voltage within time window
- avV = mean(inData(timeWinStart:timeWinEnd,:));
- % subtract average voltage from trials
- outData = inData-avV;
- end
|