Plot EEG signals from struct

조회 수: 9 (최근 30일)
Lina Fatin
Lina Fatin 2022년 7월 1일
편집: Cris LaPierre 2022년 7월 1일
From a mat file, I extracted the following parameters:
data: [15×3000000 double]
data_length_sec: 600
sampling_frequency: 5000
channels: {1×15 cell}
Because the data amount is huge I want to plot only a part of the data matrix. How do I use the sampling frequency in that case?
I started this way:
file=load(file.mat);
data= file.data;
x=data(1,1);
y=data(1,:);
y= y(0,1000);
plot(x,y);

채택된 답변

Cris LaPierre
Cris LaPierre 2022년 7월 1일
편집: Cris LaPierre 2022년 7월 1일
Sampling frequency allows you to determine the time each sample (column) of data was collected.
You have 3,000,000 samples per lead (600 sec * 5000 samples/sec). Once you create your time vector, plotting a subset is just a matter of indexing into your array of data. You can learn more about how to do that in Ch 5 and 11 of MATLAB Onramp.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by