I want to plot ecg from the .mat file I have obtained after doing some preprocessing
25 ビュー (過去 30 日間)
古いコメントを表示
The code is as below:
clc;
clear all;
close all;
ecg=load('train.mat');
f_s=300;
N=length(ecg)
t=[0:N-1]/f_s % time period(total sample/Fs )
figure, plot(t,ecg);
Link for train.mat = https://drive.google.com/file/d/1vXb3zY1hlKdXbn6cSvrm7O7OfL1Nx_qe/view?usp=share_link
Kindly help me.
0 件のコメント
採用された回答
Cris LaPierre
2022 年 12 月 15 日
編集済み: Cris LaPierre
2022 年 12 月 15 日
You are loading your mat file variables into a structure you named ecg, so you must specify which variable in ecg to plot. Your data is stored in a variable called array. Additionally, array is a 5969x18000 array. Plotting almost 6,000 waveforms on the same figure is not an effective way to view this data. You will also likely get some warning messages trying to plot 107.5 million points. Consider plotting just one for now.
Each ECG waveform is stored in a row. Try this.
ecg=load('train.mat');
ecg1 = ecg.array(1,:);
f_s=300;
N=length(ecg1)
t=(0:N-1)/f_s; % time period(total sample/Fs )
figure
plot(t,ecg1);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で ECG / EKG についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!