
f = logspace(1, 6, 201);
omega = 2*pi*f;

R = 15.8e3; %%% Ohms
C = 10e-9;  %%% Farads
tau = R*C;  %%% seconds

A = 1./(1+j*omega*tau);

subplot(211);
semilogx(f, 20*log10(abs(A)), 'b-');
xlabel('Frequency (Hz)');
ylabel('Amplitude (dB)');

subplot(212);
semilogx(f, angle(A)*180/pi, 'b-');
xlabel('Frequency (Hz)');
ylabel('Phase (deg.)');
