Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Handel's Messiah Assignment Part 3 Load the Handels_Messiah.m code included in the FILES>ASSIGNMENTS section of Canvas Review the code learn about pause command Edit the
Handel's Messiah Assignment Part 3 Load the Handels_Messiah.m code included in the FILES>ASSIGNMENTS section of Canvas Review the code learn about pause command Edit the code so that you can plot the voltages (y) as a function of t for the 500th to the 800th data point Add a comment section to your code and discuss whether the t vector is a time vector or a counting vector (just numbers) --- if it is a counting vector, speculate on how you could convert it to "time" % Sample Code to Run Handel's Messiah and Edit Output Plot clear all %% Simple Load of Handel's Messiah load handel sound(y, Fs) % y = voltages to speaker, Fs = sample rate (check workspace) % y loads as a column vector pause % this let's me control how the program continues in class % with the cursor in the command window - hit anykey to continue d = 'cool! you unpaused it - if you want to debug you can always insert lines like this to appear on screen - no semicolon' %% Plot the voltages Recorded in the Sound File (y) pause t=1: length(y) plot(t,y) % don't look at this line (Spoilers!) % t = 1 x 73113 vector --- want to show only %pause plot(t(1,1:4000),y(1:4000,1)) first 200 data points title('Handel''s Messiah') % double mark because of the apostrophe Handel's Messiah Assignment Part 3 Load the Handels_Messiah.m code included in the FILES>ASSIGNMENTS section of Canvas Review the code learn about pause command Edit the code so that you can plot the voltages (y) as a function of t for the 500th to the 800th data point Add a comment section to your code and discuss whether the t vector is a time vector or a counting vector (just numbers) --- if it is a counting vector, speculate on how you could convert it to "time" % Sample Code to Run Handel's Messiah and Edit Output Plot clear all %% Simple Load of Handel's Messiah load handel sound(y, Fs) % y = voltages to speaker, Fs = sample rate (check workspace) % y loads as a column vector pause % this let's me control how the program continues in class % with the cursor in the command window - hit anykey to continue d = 'cool! you unpaused it - if you want to debug you can always insert lines like this to appear on screen - no semicolon' %% Plot the voltages Recorded in the Sound File (y) pause t=1: length(y) plot(t,y) % don't look at this line (Spoilers!) % t = 1 x 73113 vector --- want to show only %pause plot(t(1,1:4000),y(1:4000,1)) first 200 data points title('Handel''s Messiah') % double mark because of the apostrophe
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started