To find the 3rd harmonics of a signal in Matlab, we can use Fourier transform and frequency analysis. Here's an example code showing how to do it:
816 chars25 lines
In this code, we create a signal with a fundamental frequency of 50 Hz and a 3rd harmonic frequency of 150 Hz. Then, we compute the Fourier transform of the signal and the power spectral density. Finally, we find the frequency index of the 3rd harmonic and mark it in the plot of the power spectral density.
gistlibby LogSnag