Skip to content
Related Articles

Related Articles

How to find inverse Laplace Transforms using MATLAB ?

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 21 Apr, 2021
Improve Article
Save Article

In this article, we will see how to find Laplace Transform in MATLAB. Laplace Transform helps to simplify problems that involve Differential Equations into algebraic equations. Inverse Laplace Transform converts Laplace Domain Function F(s) into time-domain function f(t)

f(t) = L^{-1}[F(s)]

Using the above function one can generate a Time-domain function of any Laplace expression.

Example 1: Find the Inverse Laplace Transform of s/(a^2 + s^2)

Matlab




% specify the variable a, t and s 
% as symbolic ones
syms a t s
  
% define function F(s) 
F = s/(a^2 + s^2);
  
% ilaplace command to transform into time
% domain function f(t)  
% Inverse Laplace Function
f1=ilaplace(F,s,t);
  
% Display the output value
disp(f1);
  
% Output can be verified by transforming 
% function f1 into Laplace Domain F(s)
f=laplace(f1,t,s);  % Laplace Function
disp(f);

Output:

which is f(t) = cos(at)

Example 2: Find the Inverse Laplace Transform of 1/(s-a)

Matlab




% specify the variable a, t and 
% s as symbolic ones
syms a t s
  
% define function F(s) 
F = 1/(s-a);
  
% ilaplace command to transform into
% time domain function f(t)
% Inverse Laplace Function
f1=ilaplace(F,s,t); 
  
% Display the output value
disp(f1);
  
% Output can be verified by transforming 
% function f1 into Laplace Domain F(s)
f=laplace(f1,t,s);  % Laplace Function
disp(f);

Output:

which is f(t) = e^{at}

Example 3: Find the Inverse Laplace Transform of 2/(s+1)+3/(s+2)+1/s

Matlab




% specify the variable a, t and 
% s as symbolic ones
syms a t s
  
% define function F(s) 
F = 2/(s+1)+3/(s+2)+1/s;
  
% ilaplace command to transform into
% time domain function f(t)  
% Inverse Laplace Function
f1=ilaplace(F,s,t);
  
% Display the output value
disp(f1);
  
%Output can be verified by transforming 
% function f1 into Laplace Domain F(s)
f=laplace(f1,t,s);  % Laplace Function
disp(f);

Output:

which is f(t) = 2e^{-t}+3e^{-2t}+1


My Personal Notes arrow_drop_up

Start Your Coding Journey Now!