Question: Please help with the following MatLab Code! Here are instructions and code provided by my professor.... please keep it simple and comment. Thank you in

Please help with the following MatLab Code! Here are instructions and code provided by my professor.... please keep it simple and comment. Thank you in advance.

To generate a simple ECG based on some of the suggested values, place these .m files in your MATLAB working directory, then execute the following code: download this code here (you will need both .m files) to run the following code: https://www.physionet.org/physiotools/ecgsyn/Matlab/

Per instruction: The only argument from ECGSYN which needs to be changed is ai (the amplitudes of the extrema):

Problem 1 :

a) By modifying the code given to you (posted below), generate plots for each of the standard 6-lead ECG leads. Clearly label your plots.

b) Modify the ECG vector definitions such that the QRS-complex is rotated by +90. Plot the outputs of the standard 6-lead ECG leads. Identify whether this represents a normal ECG, LAD, or RAD.

Code starts as follows:

%%%%%%%%%%%% start of code

sfecg = 256; % Sampling frequency N = 10; % Approximate number of heartbeats Anoise = 0; % Noise [mV] hrmean = 60; % Mean heart rate hrstd = 1; % Std. dev. of heart rate lfhfratio = 0.5; % Ratio of low-frequency to high frequency components sfint = 256; % Internal sampling rate ti = [-70, -15, 0, 15, 100]; % Angles of extrema [P Q R S T] within cardiac cycle ai = [1.2, -5, 30, -7.5, 0.75]; % Magnitudes of extrema bi = [0.25, 0.1, 0.1, 0.1, 0.4]; % Gaussian width of peaks ecg = ecgsyn(sfecg,N,Anoise,hrmean,hrstd,lfhfratio,sfint,ti,ai,bi); plot(ecg);

%%%%% second set of insructions

aVR_angle = -150; aVR_vector = [cosd(aVR_angle); -sind(aVR_angle)]; aVR_ecg = zeros(1,length(ECG_vector(1,:))) for i = 1:length(ECG_vector(1,:)) aVR_ecg(i) = dot(ECG_vector(:,i), aVR_vector) end ai = aVR_ecg ecg = ecgsyn(sfecg,N,Anoise,hrmean,hrstd,lfhfratio,sfint,ti,ai,bi); plot(ecg);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end of code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!