These are two M-files “fourier1” and “fourier2” The first is designed to demonstrate how triangular, rectangular, saw tooth, half wave and full wave rectified signals can be built from superposition of a predefined no of Fourier harmonic terms. It demonstrates how increasing the number of terms included in the summation will improve the signal shape.
The second file is useful for analyzing actual audio signals connected to the PC line in port of the sound card. The out put of the program is plot showing all harmonic amplitudes contained in the signal.. It can be used with a microphone, a signal generator, or with any sound pre-recorded or saved and being played on the PC.
more flexible data sampling rates, and number of data points
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.