필터 지우기
필터 지우기

How to plot 5000 ecg signals from the Physionet 2017 ECG datset

조회 수: 5 (최근 30일)
Neha Sinha
Neha Sinha 2023년 1월 18일
답변: Ganapathi Subramanian 2023년 3월 3일
I have written the following code to plot 5000 ecg signals from the attached file wherein each row depicts an ecg.
% Load the ECG dataset
ecg = load('train.mat');
% Define the number of rows and columns for the subplots
rows = 10;
cols = 500;
% Create a figure
figure;
% Create a scroll panel
scroll = imscrollpanel(gcf, [0 0 1 1]);
% Create an axis container
ax = axes('Parent', scroll);
% Plot the ECG signals
for i = 1:5000
subplot(rows,cols,i,'Parent',ax);
plot(ecg.y(i,:));
title(['ECG signal number ', num2str(i)]);
xlabel('Sample');
ylabel('Amplitude');
end
I am getting error with imscrollpanel as below
How to rectify this?

답변 (1개)

Ganapathi Subramanian
Ganapathi Subramanian 2023년 3월 3일
It is my understanding that you are plotting ECG signals and have an uncertainty in using ‘imscrollpanel’ function.
The syntax for 'imscrollpanel' function is as follows
hpanel=imscrollpanel(hparent,himage)
It creates a scroll panel containing the target image. himage is a handle to the target image. hparent is a handle to the 'figure' or 'uipanel' that will contain the scroll panel. The function returns hpanel, a handle to the scroll panel.
The function ‘imscrollpanel’ doesn’t take plot as input. It only takes images as input.
For more information regarding ‘imscrollpanel’, refer this link
Refer to the below file exchange to create a scroll panel for a plot.

카테고리

Help CenterFile Exchange에서 Build Interactive Tools에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by