Transcribed TextTranscribed Text

Task 1 (17 pts): In an *.m file, load in the same SampleECG data provided in Lab 1. Create a new array containing the second half of the SampleECG signal (samples 129:256). Invert the signal by multiplying each element of the signal by -1. What is the minimum value of this signal? What is the maximum value of this signal? What is the vector length of this signal? Task 2 (17 pts): Create a new array that contains all numbers from 1 to 24 using " operator. Calculate a new array by finding the square root of each number in your array. Find the total sum of all numbers in this array. What is the natural logarithm of that value? Hint: ansuer 4.3899 Task 3 (16 pts): Prompt the user to input any two separate variables into MATLAB. Assign variable IT to be the ratio of the two variables. Calculate the following function of this ratio tan(r7) y = + Vr++1 sin(rr - 1) + cos(rr + 1)

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

clear; clc; close all;%Clear memory and screen
%Task 1
disp('Task 1');
T = dlmread('ECGSample.txt');%Load file
T_sh=T(129:256);%Create array of second half of data
T_sh=T_sh*-1;%Invert signal
fprintf('\nInverted second half Signal details: Max. value=%8.5f, Min. Value=%8.5f\nand length of signal vector=%i\n\n',max(T_sh),min(T_sh),length(T_sh));
disp('Press any key to continue');

By purchasing this solution you'll be able to access the following files:
ECGSample.txt and Tsk123.m.

50% discount

$20.00 $10.00
for this solution

or FREE if you
register a new account!

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

Find A Tutor

View available MATLAB for 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.

Upload a file
Continue without uploading

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