How do I find Laplace transform F(s) = L{f(t)} and inverse Laplace transform f(t) = L^{-1}{F(s)} in MATLAB?
John Williams answered .
2026-07-24
Use laplace() and ilaplace() functions from Symbolic Math Toolbox:
syms t s a
% 1. Forward Laplace Transform: f(t) -> F(s)
f = exp(-a*t) * sin(3*t);
F = laplace(f, t, s);
disp('Laplace Transform F(s):');
pretty(F)
% 2. Inverse Laplace Transform: F(s) -> f(t)
F_sys = 1 / (s^2 + 4*s + 13);
f_time = ilaplace(F_sys, s, t);
disp('Inverse Laplace Transform f(t):');
pretty(f_time)