clc;clear;close all;
% component parameter
R = 1e3;
L = 10e-3;
C = 50e-9;
% time 
t = linspace(0,2e-3,10000);
% Input
Vin = 3*cos(t.*t.*t*1e11);
% Transfer function
s = tf('s');
G = R/(R + s*L + 1/(s*C));
% Calculate Vout
Vout = lsim(G, Vin, t);
% Plot
plot(t*1e3, Vin, 'b', 'LineWidth',1.5);
hold on;
plot(t*1e3, Vout, 'r', 'LineWidth',1.5);
ylim([-4, 4]);
xlabel("time [ms]");
grid on;
legend(["Vin", "Vout"]);