Skip to content

Instantly share code, notes, and snippets.

@jpcima
Created July 4, 2021 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpcima/cc71d94f57fdb17f003e6636cfadf71d to your computer and use it in GitHub Desktop.
Save jpcima/cc71d94f57fdb17f003e6636cfadf71d to your computer and use it in GitHub Desktop.
param1 = 0.5; % knob 0 to 1
Fs = 44100.0;
R1 = 330e3;
C1 = 220e-12;
R2 = 3.3e3;
C2 = 10e-9;
Rp = 100e3 * param1;
Num = [(R1*C1*(Rp+R2)*C2) (C2*(Rp+R2)+R1*C1+R1*C2) 1.0];
Den = [(R1*C1*(Rp+R2)*C2) (C2*(Rp+R2)+R1*C1) 1.0];
[H,W] = freqs(Num, Den);
Freq = W/(2*pi);
Mag = 20*log10(abs(H));
semilogx(Freq, Mag);
grid on;
grid minor;
%[z,p,k] = tf2zp(Num, Den);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment