clc;
clear all;

syms H X Y x y s t;

R = 1;
L = 4;
C = 1;
w = 1/2;


%% RLC circuit
x = cos(w*t) * heaviside(t);
X = laplace(x)
H = (1/(L*C)) / (s^2 + (R/L)*s + 1/(L*C))



y = simplify(ilaplace(X*H))


subplot(2,1,1);
ezplot(x, [0 100]);

subplot(2,1,2);
ezplot(y, [0 100]);
hold on;
plot(0:99, ones(1,100), 'r');
