i need to know if its possible to plot a certain number of datas and then plot the next in another plot and so on

3 visualizaciones (últimos 30 días)
i have an EEG dataset in a file with an odd extension 'eea'
i managed to be able to read it in matlab and plot it, but each 7680 numbers represent one channel, and the whole data of the patient is 122880, i want to know if there is a way to code a script so that it automatically grabs the firs 7680 datas and then the next and so on and plots them separately, also if its possible to plot it and make it look like one of those EEG data plots graphs and with a name on each one
my code:
clc; clear; close all;
data = load('S196W1.eea');
plot(data);
xlim([-2000 125000])
ylim([-2550 2550])
grid
% Avoid exponential notation and have the Y axis locked during a zoom
Ax = gca;
Ax.XAxis.Exponent = 0;
Ax.YAxis.TickLabelFormat='%d';
Ax.YAxis.Exponent =0;
set(zoom(gcf),'Motion','horizontal','Enable','on');
>>from looking like this
>>to something that is similar to this

Respuesta aceptada

Voss
Voss el 4 de Jun. de 2024
Editada: Voss el 4 de Jun. de 2024
% data = load('S196W1.eea');
data = 500*randn(122880,1); % random data the same size as yours
n_channels = 16;
data_plot = reshape(data,[],n_channels)./max(abs(data),[],'all')+(1:n_channels);
plot(data_plot)
yticks(1:n_channels)
yticklabels(compose("Ch-%02d",1:n_channels))

Más respuestas (0)

Categorías

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

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by