EEG plot without toolbox
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Greg Athanasiadis
el 25 de En. de 2018
Respondida: Walter Roberson
el 25 de En. de 2018
I have my EEG data with 59 channels [(my_data is a 1619936x54 vector) ,fs=200] and a vector called markers (1x202) which have the events timepoints. How can i plot the events from one channel. I chose POz channel which is the 56 column of my data so:
chanPOz =my_data( :, 56);
plot(chanPOz(27900:28000),'b')
set(gca,'ylim',[0 100],'xlim',[0 50]);
The first element of markers is 27965 so i plot the channel between 27000 &28000 but obviously that is uncorrect
0 comentarios
Respuesta aceptada
Walter Roberson
el 25 de En. de 2018
selection_idx = 27900:28000;
timevec = (selection_idx - 1) / fs; %the -1 is because time is assumed to start at 0
plot(timevec, chanPOz(selection_idx), 'b');
marker_to_idx = round(markers * fs) + 1; %the +1 is because time is assumed to start at 0
mask = ismember(marker_to_idx, selection_idx);
selected_markers_idx = marker_to_idx(mask);
selected_markers_time = markers(mask);
selected_markers_y = chanPOz(selected_markers_idx);
plot(selected_markers_time, selected_markers_y, 'r*'); %plot markers as red *
0 comentarios
Más respuestas (0)
Ver también
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!