I tried to plot the magnitude of transfer function using Matlab.
\$ H(\omega) = \frac{V_0}{V_i} = \frac{R}{R + j\omega L + 1/j\omega C} = \frac{R}{R + j(\omega L - 1/\omega C)} \$
simulate this circuit – Schematic created using CircuitLab
Matlab code:
%% Band-pass filter
R = 1;
C = 1;
L = .02;
w = 0:.01:10;
H = R ./ (R + 1i*(w * L - 1./(w * C)));
mag = abs(H);
% plot magnitude
figure(3), clf
plot(w, mag);
title('Frequency response of RLC series resonent circuit')
xlabel('\omega'), ylabel('|H(\omega)|')
hold on
% plot center frequency
w_center = 1 / sqrt(L*C);
plot([w_center w_center], get(gca, 'ylim'), 'r--')
plot(get(gca, 'xlim'), [.7071 .7071], 'r--')
How do I choose the value of R, L and C that can plot the actual curve below as same as possible.