Question: Use the code below to see ECG data and the file obtained it contains 1 minute of ECG data in variable ecg. Take the Fourier

Use the code below to see ECG data and the file obtained it contains 1 minute of ECG data in variable ecg. Take the Fourier transform. Plot both the magnitude and phase (unwrapped) spectrum up to 20-Hz and do not include the DC term. Find the average heart rate using the strategy found in Example 3.13. The sample frequency is 250-Hz. [Note: The spectrum will have a number of peaks; however, the largest low-frequency peak (which is also the largest overall) will correspond to the cardiac cycle.

Code to see ecg data

function importfile(fileToRead1) %IMPORTFILE(FILETOREAD1) % Imports data from the specified file % FILETOREAD1: file to read

% Auto-generated by MATLAB on 16-Apr-2017 21:32:29

% Import the file newData1 = load('-mat', fileToRead1);

% Create new variables in the base workspace from those fields. vars = fieldnames(newData1); for i = 1:length(vars) assignin('base', vars{i}, newData1.(vars{i})); end

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!