In: Computer Science
Show the code in matlab to display an ECG graph
(I do not want code that simply calls the ecg function in matlab
but how to write that kind of code)
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
Brother I am senior expert in matlab. Below is the code which plots tthe ecg without using ecg command. But, since we need data of ecg. So, we have to fetch the data from somewhere. I am fetching the data from a link through matlab. It then plots the ecg in matlab.
clc
clear all
close all
format long
file =
'http://people.ucalgary.ca/~ranga/enel563/SIGNAL_DATA_FILES/ecgpvc.dat';
ecg = str2num(urlread(file));
time = (1:numel(ecg))/200;
plot(time,ecg,'b')
axis ([15 20 1500 2800])
title('Task DRaw ECG Data plotting ')
xlabel('time')
ylabel('amplitude')
grid on
Kindly revert for any queries
Thanks.