Write a MATLAB script (m) file that builds an array e(k) which consists of the waveform sin(2π*10t) sampled over a 1 second time interval at a sample period T which is one tenth of the signal period. Now sample the acquired waveform at a period of T/5. Consider the acquired waveform to be constant between sample points. Plot the two waveforms and see that this is what you expect.
Use the FFT to compute the magnitude spectrum of the signal having the higher sampling frequency of 5/T Hz. Determine the frequency array and plot the first half of the magnitude spectrum as a function of frequency with the proper scaling of the vertical and horizontal axes. How many frequencies are present in the graph? Plot the magnitude spectrum of the zero order hold and compare the magnitude to the magnitude of the frequencies present to the zero order hold spectrum. Compare your results to that of Figure 3.14 (3rd ed.) of the text. Predict the frequencies that should be present and compare these values to those indicated in your magnitude spectrum plot. Why was the graph plotted over only half of the data?