%laplace.m
%Computation of Laplace Transform and Inverse Laplace Transform
%Introduction to:
%- laplace
%- ilaplace

clc

%Laplace Transform
syms t

%Example 1
laplace(t*sin(3*t))

%Example 2
laplace(t*exp(-3*t))

%Example 3
laplace(t*sin(3*t)-2*t*cos(t))

%Example 4
syms a b
laplace(exp(-a*t)*cos(b*t))

fprintf('\nPress a key to continue ... \n')
pause

%Inverse Laplace Transform
syms s

%Example 1
ilaplace(1/(s+1))

%Example 2
ilaplace(2*(s^2+s+1)/s/(s+1)^2)

%Example 3
ilaplace(exp(-s)/s^2)

%Example 4
ilaplace(b^2/s/(s+a)^2)



