Question: Q1 . write a Matlab script that generates a signal with three frequencies and use the fast fourier transform (fft) to find determine the frequency

Q1 . write a Matlab script that generates a signal with three frequencies and use the fast fourier transform (fft) to find determine the frequency content of the signal. The frequency axis must be properly scaled to show the actual frequencies in the signal. The parameters, functions needed, and tasks are: Frequencies: fl 5, 15 and 30 Hz Sample rate: fs-100 Hz (same for all frequencies) Number of time ticks: 100 time ticks at Ts = 1/ Suggestion: create the signal at each frequency and add to get composite signal with all frequencies Example to generate a signal as frequency f1: s1 = sin(2*pi*f1 *t); where t is the 100 element time tick vector referred to above. (Use sine function for eac frequency component.) Do a 512 point fft, so if the signal name was s, then the code to accomplish the 512 point fft if we assign N-512 is: S- fft(s,N). S is vector of complex number in the S in the frequency domain. To graphical view S, one must plot its magnitude. To display S over the appropriate frequency range, make a vector of frequencies as follows: f= (0 : N/2-1 )/N/2*(fs/2); This vector provides the x-axis to view S. e Make a2x 1 subplot: The first plot is the composite time signal consisting of the three frequencies in the time domain. Give appropriate title and label x and y axes. The second shows the fft results in the frequency domain. It must show the three frequency components centered at 5,15 and 30 Hz. Give appropriate title and label x and y axes o o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
