Question: MATLAB CODE ONLY If you type load handel in Matlab (not Octave), you get a vector y that represents the first nine seconds of Handels

MATLAB CODE ONLY

If you type load handel in Matlab (not Octave), you get a vector y that represents the first nine seconds of Handels Messiah. It also loads a variable called Fs, which is the sampling rate that y was recorded at. The command sound(y,Fs) plays the file using sampling rate Fs. Use Matlabs fft command to plot the frequency spectrum of this audio file and determine the frequency with the largest amplitude.

Hints: The length of the file is not exactly 9 seconds. The sampling rate is the default rate of 8192 Hz, or 8192 evenly spaced samples for each second recorded. Therefore the total length of the recording is the number of samples (i.e., the number of elements in y) divided by Fs. The frequency represented by the kth element of the Discrete Fourier Transform is k divided by the total length of the recording.

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!