You can achieve this by generating a rectified sine wave and then plotting its magnitude vs. frequency without using FFT in MATLAB. Here is an example code to do this:
main.m417 chars18 lines
This code will generate a rectified sine wave with a frequency of 5 Hz, compute the frequency vector, and then plot the magnitude vs frequency.
gistlibby LogSnag