thd
Total harmonic distortion estimate.
📝Syntax
D = thd(X)
D = thd(X, Fs)
📥Input Arguments
Parameter Description
X input signal.
Fs sample rate.
📤Output Arguments
Parameter Description
D distortion estimate in decibels.
📄Description

thd estimates total harmonic distortion from FFT magnitudes.

💡Examples
d = thd(sin((0:255)' * 0.1));
🔗See Also
snr
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub