How to segment signals by time?
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Juan Sanchez
il 17 Ago 2018
Commentato: Juan Sanchez
il 20 Ago 2018
I'm sorry for the basic question but Im working with a signal of 22 seconds duration with a Sample frequency of 500 Hz. I want to separate the vector into smaller vectors of 0.5 seconds each. Any idea on how to do it?
This is the code I have:
%
erp=ALLEEG(2).data(1,:,1) % The Test signal extracted from EEGLAB
FS=500 % Sample frequency
T=1/FS
L=length(erp); %Length of erp signal is 11264 samples
tiempo=(0:L-1)*T;
plot(tiempo,erp)
So I need to separate the singal into smaller vectors of data of 500 ms each. EEGlab allows you to work on one signal but because im working with a lot of them I'm scripting to process all data.
Sorry for the basic question and thanks for any help.
Best regards
0 Commenti
Risposta accettata
Yuvaraj Venkataswamy
il 18 Ago 2018
Modificato: Yuvaraj Venkataswamy
il 18 Ago 2018
22 seconds of EEG signal having 11264 samples. Here, you can find the number of samples for 1 second. Then you find easly for 0.5 sec.
From your input,if you are going to divide 0.5 second samples means totally you will get 44 epochs. So,
11264/44=256 is 0.5 second samples. In your data, 0 to 256 samples= 0 to 0.5 second 257 to 512 samples= 0.5 to 1 second . . . Etc.
For 0.5 second, You will get 44 epochs and each epochs contain 256 samples.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su EEG/MEG/ECoG in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!