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 次查看(过去 30 天)
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

采纳的回答

Voss
Voss 2024-6-4
编辑:Voss 2024-6-4
% 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))

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 EEG/MEG/ECoG 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by