• Jun 15, 2026 harmonic distortion matlab code b, a, signal); end % Plot filtered signal figure; plot(t, signal); title('Filtered Signal'); xlabel('Time (s)'); ylabel('Amplitude'); ``` 2. Power Quality Analysis Assessing the impact of harmonic distortion on power systems. ```matlab % Calculate THD for power system waveform % Using bui BY Evan Fisher