Question: Use MATLAB to generate N-128 evenly spaced points t between 0 and 2 and evaluate the function ft) = cos(41*t)+sin(15*t). Add a random component to

 Use MATLAB to generate N-128 evenly spaced points t between 0

Use MATLAB to generate N-128 evenly spaced points t between 0 and 2 and evaluate the function ft) = cos(41*t)+sin(15*t). Add a random component to this function using the function randn. Use fft to generate a DFT of these values. (a) Plot the function f(t) before and after adding the random component, to make sure you are truly randomizing it. You should notice that the periodicity is not apparent anymore in the randomized version. However the power spectrum approach below will detect periodicity in the signal even if it is not obvious in the time domain. (b) Plot the power spectrum for the first 64 coefficients (i.e. the positive frequency spectrum). In the plot, assign values 0:63 to the x-axis. Now plot the full power spectrum. In the plot, assign values 0:127 to the x-axis. Mark the Nyquist frequency in the plot (can be drawn by hand and embedded as a photo/scan or indicated using your Word processor below the plot) (c) (d) Now use fftshift to create a plot of the full spectrum centered at zero. In the plot, assign values -64:63 to the x-axis

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!