For most signals of VEP, when the stimuli occurs , the response are expected from our brain then recored by the EEG, in thi case we have observed the timepoint and try to cut the signals with same length, as usual, the averaged signal could give more useful and markable information .
we have a example code from EMG, right or left hands had been lifted when the signal was given, we have three kind types of data and 32 channels .
segment_tplength=round(sr*segment_length);% data length
%% mark the movement time lind
right_hand=find(stimarker(:,1)==1);% find the movement
signal=Hbdata(:,select_type,channel);%get the signal
% plot the mark with fuction ([x,x],[y,y])
%% segment signals
%cut and store the signal
meanleft=mean(leftsignal,2);% mean for column