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
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