clear all; clc; close all; %% Passa baixas c = 50e-9; r = 5e2; f = 0:100:1e7; w = 2*pi*f; fc = 1/(2*pi*r*c); hw = 1./sqrt(1 + (w.*r.*c).^2); gb = 20*log10(hw); phi = rad2deg(-atan(w.*r.*c)); hold all yyaxis left plot(f,gb,'-r'); yyaxis right plot(f,phi,'--r'); hold off h = gca; set(h,'xscale','log') %% Passa altas c = 50e-9; r = 5e2; f = 0:100:1e7; w = 2*pi*f; fc = 1/(2*pi*r*c); hw = (w.*r.*c)./sqrt(1 + (w.*r.*c).^2); gb = 20*log10(hw); phi = rad2deg(atan(1./(w.*r.*c))); hold all yyaxis left plot(f,gb,'-r'); yyaxis right plot(f,phi,'--r'); hold off h = gca; set(h,'xscale','log') %% Passa banda c = 50e-9; l = 3.3e-3; r = 5e2; f = 0:100:1e7; w = 2*pi*f; f0 = 1/(2*pi*sqrt(l*c)); q = (f0*2*pi)*l/r; hw = r./sqrt(r.^2 + (w.*l - (1./(w.*c))).^2); gb = 20*log10(hw); phi = rad2deg(-atan((w.*l - (1./(w.*c)))./r)); hold all yyaxis left plot(f,gb,'-r'); yyaxis right plot(f,phi,'--r'); hold off h = gca; set(h,'xscale','log') %% Rejeita faixa c = 50e-9; l = 3.3e-3; r = 5e0; f = 0:100:1e7; w = 2*pi*f; f0 = 1/(2*pi*sqrt(l*c)); q = (f0*2*pi)*l/r; hw = 1./sqrt(1 + (r./(w.*l - (1./(w.*c)))).^2); gb = 20*log10(hw); phi = rad2deg(atan(r./(w.*l - (1./(w.*c))))); hold all yyaxis left plot(f,gb,'-r'); yyaxis right plot(f,phi,'--r'); hold off h = gca; set(h,'xscale','log')