Created
March 11, 2022 23:37
-
-
Save WillNilges/cc12fb32f16ca808a095d235ab582e41 to your computer and use it in GitHub Desktop.
Matlab is a bad product that doesn't function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb=[1,-2,2,-1]; %filter coefficients | |
ww=linspace(-1,1,250); % frequency grid (normalized) | |
HH = freqz(bb,1,ww*pi); % frequency response | |
% Show results in one figure | |
subplot(211); % select top subfigure | |
plot(ww,abs(HH)); % generate plot | |
ylabel('Magnitude') % y axis label | |
xlabel('Freq [\times \pi]') % x axis label | |
grid % this adds a grid | |
subplot(212); % select top subfigure | |
plot(ww,angle(HH)); | |
ylabel('Phase [radians]') | |
xlabel('Freq [\times \pi]') | |
grid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment