Matlab interpretation array questions
5 次查看(过去 30 天)
显示 更早的评论
Hi All,
I find and ECG signal generator code in matlab and I want to translate to my controller in C and some lines are unclear for me. Any help is welcome. What the below codes does ? 1) t_line=0:1/fs:duration; %time line, seconds fs and duration are constant values
2) QRS_wave=zeros( size(t_line) ); %QRS waveform is declared, but on the code I see referencies to QRS1=m2*index2time(i_t1:i_t2)-(m2*t1-left); QRSwave(i_t1:i_t2)=QRS1; What is QRS1 and what is QRSwave ? relation to QRS_wave ?
Thanks for anyone who can help ! Zoltan
0 个评论
回答(2 个)
KSSV
2016-11-21
I think you are talking about this code. https://www.physionet.org/physiotools/matlab/ECGwaveGen/ECGwaveGen.m
qrs_start=t1; % begining time
t2=t1+d1; % d1 = d1=0.4375*d; d can be changed
i_t1=time2index(t1); i_t2=time2index(t2); % change time to indices, this is a function given
left=0; right=0.875*amp;
m1=(right-left)/(t2-t1);
QRS1=m1*index2time(i_t1:i_t2)-(m1*t1-left); % picking times from the indices
QRSwave(i_t1:i_t2)=QRS1; % append first segment data to final result
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Continuous Waveforms 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!