-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_script.m
More file actions
38 lines (28 loc) · 859 Bytes
/
test_script.m
File metadata and controls
38 lines (28 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%% Test script
function [outputEEG] = test_script()
try
eeglab;
% Load test data set
data_filename = 'S1_EEG.set';
data_filepath = './data/';
inputEEG = pop_loadset(...
'filename', data_filename , ...
'filepath', data_filepath );
% View Input data
eegplot(inputEEG.data ...
, 'srate' , inputEEG.srate ...
, 'events' , inputEEG.event ...
, 'winlength', 20);
eventcodes = {'22', '19'};
timeshift = 0.015;
rounding = 'floor';
outputEEG = erplabShiftEventTime(inputEEG, eventcodes, timeshift, rounding);
% View the Output data
eegplot(outputEEG.data ...
, 'srate' , outputEEG.srate ...
, 'events' , outputEEG.event ...
, 'winlength', 20);
catch err;
rethrow(err);
end
end % function