Question: Using Matlab: I need the code for: a. Plot a 1 Hz sine wave b. Plot the unit rectangle function c. Plot the unit triangle

Using Matlab:

I need the code for:

a. Plot a 1 Hz sine wave

b. Plot the unit rectangle function

c. Plot the unit triangle function

Show each over a plotting interval -5 sec to 5 sec

d. Plot each of the signals in a,b,and c with a time shift of 0.5 seconds (delay)

e. Plot each of the signals in a,b, and c with a time scaling compression of 3

Are the results matching what you would expect?

Use the fft, fftshift and other commands in MATLAB to produce the spectra in this problem. (For all problems in this lab, well just look at magnitude spectra.) Since the FFT is a discrete operation, its important to make sure the horizontal axes units are correct. The MATLAB documentation at the following website is very helpful: http://www.mathworks.com/help/matlab/ref/fft.html

f. Plot the spectra of the signals in a,b,c, and e. Produce three plots by plotting the spectra of each type on the same plot (e.g., spectra of sine and time-compressed sine on the same plot). Do these match your predictions based on the scaling property?

g. Lets look at signal from the real world and explore spectral features. Load the file tonal_voice.wav from the course module using the MATLAB audioread command. Plot the spectrum of this signal using the MATLAB tools you developed from the previous problems. What do you observe from this real signal?

h. Locate another wav file in the resources for generate one of your choosing and plot the spectrum. What are your observations?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question is quite comprehensive Ill provide a ste... View full answer

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!