QuestionQuestion

Transcribed TextTranscribed Text

Objectives: Utilize advanced plotting utilities to create high quality figures Design plots to convey data meaningfully Deliverables: A working copy of single *.m file for cach part, well-commented, with your name, date, and assignment description at the top. Part 1 Background: Your second lab assignment introduced you to advanced plotting features of MATLAB. In this homework assignment you will write MATLAB code to generate a small handful of nicc-looking figures. Be sure to reference back to previous assignments, MATLAB help files, and the Zybooks text if you get stuck. Task 1: In the lab assignment, you created a smooth ECG recording by averaging together five separate recordings Create an *.m fike, and load both your smoothed ECG and one of the original ECG recording files provided in the sccond lab. Create a now figure and plot both an original ECG recording and your smoothed ECG recording, Use different colors for cach signal. Include legend indicating which color corresponds to which recording, Be sure to create time vector so that your x-axis values are in scconds Include axis labels and plot title. Task 2: Instead of placing the two recordings on the same plot, as in Task 1, produce two plots side-by-side. One will have the original unsmoothed recording and the other the smoothed ECG waveform. (This is just repcat of Task but on two separate plots). All the usual components should be included on both plots Task 3: Each of the ECG recordings you have used so far contains only one ECG cyck. In typical electrocardiogram, a similar signal morphology would repcat so long as the individual's heart is beating. Using your knowledge of MATLAB, create a new ECG recording by repeating your smoothed ECG recording three times into one ECG recording (sce below). Plot and label your signal appropriately Bc sure that your x-axis now accounts for signal that is three times as long as the original. PART 2 You are given the following sct of data obtained experimentally Independent variable Dependent (y) (x) measured in variable (measured liters/second (L/s) in kW) 5 38 to 53 15 57 20 67 25 72 30 88 40 106 50 125 60 129 Create a MATLAB script to perform the following tasks: 1. Sclect appropriate type of plot to present this data (chose from lin-lin, log-lin, lin-log and kog-log). Explain why you chose this type using comment line(s) in your code. 2. Plot the data points on your selected type of graph. 3. On the same graph, plot the best fit line through the data points. You can either calculate the line's parameters manually using the linear regression cquations, or you can use MATLAB's built-in pablif function. 4. Use different colors for the measured data points and the fitted line. Properly label the axes, provide good title, and add legend. Part 3 You are given the following function to plot: H (1+(WR)) where CO 2nd and fis signal frequency in Hz (Hertz), R is resistance in o (Ohms) and Cis capacitance in P (Farads). Variable H on the left is your dependent variable and frequency f is your independent variable. Create a MATLAB script to perform the following tasks: 1. Choose reasonable number of data points over a frequency range from 0.1 Hz to 100kHz. (hint: consider whether linspace or logspace function would be useful for this problem) 2. Plot H versus f for these combinations of R and C: a. R C 200 up b. R 10k9, C 0.05 pF 3. Place both curves on the same log-log graph. 4. Use different colors and line styles for the curves. Properly label the axes, provide : good title, and add a legend.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Part1Task1:
% Clearing memory, screen and closing all open plots
clc;
close all;
clear;

% Loading ECG data
load('ECG1');
load('ECG2');
load('ECG3');
load('ECG4');
load('ECG5');

% Creating an average ECG out of five seperate recordings
AverageECG=(ECG1+ECG2+ECG3+ECG4+ECG5)/5;

% Creating a time vector
f=256;
time=linspace(0,length(ECG1)/f,length(ECG1));...
$35.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Electrical Engineering Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats