I need to understand the meaning of an epoch in EEG signal. I have an EEG signal. Then how can I get the epoch?
EEG epoching is a procedure in which specific time-windows are extracted from the continuous EEG signal. These time windows are called “epochs”, and usually are time-locked with respect an event e.g. a visual stimulus.
If your EEG data are in a matrix [channel x time] where time is the complete continuous EEG signal, after the epoching procedure you should have a matrix [channel x time x epochs] where time is the time length of each epoch, and epochs is the number of segments you extracted from continuous EEG signal.
Finally, if you want to extract epochs from your signal, you should know what are the segments of interest to be analyzed, for instance, a specific stimulus.
In order to answer your question in a simple way, imagine we have a signal x with length of 60-s and our sampling frequency is 1 Hz.
The matrix representation of your EEG signal would be 1*60 array or matrix, so if you divide your main signal to some 2-s signals, you would have 30 epoch(each 2s of your main signal would be an epoch).
You could done this by a simple for loop in matlab and at the end you would have a new matrix which size is 30*1*2.