MATLAB: THD calculation using FFT tool and mathematically

fftthd

i used the FFT tools to compute the THD and it gave me a certain value. then, when i calculated the THD using a mathematical equation i got a different value. So, please i want to know how the FFT tools of powergui compute the THD. i.e, by which equation it calculate the THD?

Best Answer

Do you have Signal Processing Toolbox? If you do, see the function thd()