To plot the magnitude response of a Butterworth low-pass filter (LPF) in MATLAB, you can use the butter function to design the filter and the freqz function to compute and plot its frequency response. First, specify the filter order and cutoff frequency, then create the filter coefficients. Finally, call freqz with the filter coefficients to visualize the magnitude response. Here is a quick example:
<code class="language-matlab">[b, a] = butter(4, 0.3); % 4th order Butterworth LPF with 0.3 normalized cutofffreqz(b, a); % Plot the magnitude and phase response
</code>
Copyright © 2026 eLLeNow.com All Rights Reserved.