How to cut EEG signal?

6 visualizaciones (últimos 30 días)
MEGAT FARIZUL AUZAN  ZUHAIRI
MEGAT FARIZUL AUZAN ZUHAIRI el 2 de Mayo de 2014
Editada: Daisy Das el 29 de Mzo. de 2023
My EEG recording is 300sec.. how to extract from 180sec to 240sec ?

Respuestas (2)

Azzi Abdelmalek
Azzi Abdelmalek el 2 de Mayo de 2014
If s is your signal
n=numel(s);
n1=fix(180*n/300);
n2=fix(240*n/300);
out=s(n1:n2)
  2 comentarios
Vaishali Harsulkar
Vaishali Harsulkar el 2 de Feb. de 2018
Thank you for this solution. It is working.
Nikki Larsen
Nikki Larsen el 20 de Abr. de 2020
Editada: Nikki Larsen el 20 de Abr. de 2020
what do i do if I have floating numbers for time for example instead of 180s what if i have 0.45673s but my total time is 300s? I tried the code above but it did not work,the 'out' was empty.
Your help would be very much appreciated.

Iniciar sesión para comentar.


Daisy Das
Daisy Das el 29 de Mzo. de 2023
Editada: Daisy Das el 29 de Mzo. de 2023
data = importdata("filename.mat"); %enter the filename manually
Error using importdata
Unable to open file.
fs = 256; % sampling frequency of the signal (enter manually)
start = 180;
endd = 240;
out_row = data(:, start*fs:endd*fs); % if each row represents one channel
out_col = data(start*fs:endd*fs, :); % if each column represents one channel

Categorías

Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by