View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Numerical Inverse Laplace Transform

5.0 | 7 ratings Rate this file 41 Downloads (last 30 days) File Size: 176 KB File ID: #39035 Version: 1.0
image thumbnail

Numerical Inverse Laplace Transform


Tucker McClure (view profile)


Numerical approximation of the inverse Laplace transform for use with any function defined in "s".

| Watch this File

File Information

This set of functions allows a user to numerically approximate an inverse Laplace transform for any function of "s". The function to convert can be passed in as an argument, along with the desired times at which the function should be evaluated. The output is the response of the system at the requested times.

For instance, consider a ramp function.
f = @(s) 2/s^2;
t = [1 2 3 4 5]';
talbot_inversion(f, t)

The time response output is [2 4 6 8 10], as expected.

These methods can be used on problems of considerably more difficulty as well and are intended to approximate an inverse Laplace transform where an exact solution is unknown.

Two basic solvers (Euler and Talbot) are included, along with *symbolic* versions of those solvers. The symbolic solutions take substantially longer to calculate, but are capable of any desired accuracy. Also, the symbolic versions require the Symbolic Toolbox, whereas the basic versions do not.

Please see example_inversions.pdf or html/example_inversions.html to get started!

Required Products Symbolic Math Toolbox
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (15)
08 Aug 2016 Li Zhang

Thanks, Tucker!

Comment only
08 Aug 2016 Tucker McClure

Hi Li Zhang,

Thanks for the rating! This code was all based on the following work:

Abate, Joseph, and Ward Whitt. "A Unified Framework for Numerically Inverting Laplace Transforms." INFORMS Journal of Computing, vol. 18.4 (2006): 408-421. Print.

I can only take credit for coding it up in a MATLAB-appropriate way. Here's the MLA citation for the code. You'll need to change the last date to the date that you downloaded it.

McClure, Tucker. Numerical Inverse Laplace Transform. Computer software. Mathworks File Exchange. N.p., 4 Jan. 2013. Web. 8 Aug. 2016.

Comment only
07 Aug 2016 Li Zhang

Hi Tucker, I used your package in my paper. How to cite it ?

21 Jul 2016 Fatih Olmez

09 May 2016 Christian Reece

18 Mar 2016 H Xue

H Xue (view profile)

09 Sep 2015 Will Mansouri

Hi tucker

Thank you. Would your inverse laplace result in a solution that can be used as a starting condition and still maintain the same solution?

Comment only
04 Jun 2015 Mohamed Yassin OUKILA

Hi Tucker,

Thank you very much for the help. I have just read your answer and I it helped me a lot.


26 Apr 2015 Günter Pfeifer

Doesn't work very well with
periodic functions like:

F1 = @(s) 1 / (s * (1 + exp(-s)));
F1 = @(s) (1 - exp(-s) .* (s + 1)) ./ (s.^2 .* (1 - exp(-s)));

Comment only
03 Mar 2014 Yang

Yang (view profile)

I would like to compute the inverse laplace transform of 1/(s-1i), which is exp(1i*t). But the programs are not working for this problem. Please help!

Comment only
04 Oct 2013 Deepak Ramaswamy

26 Apr 2013 Lee

Lee (view profile)

15 Mar 2013 Tucker McClure

Tucker McClure (view profile)

Hi Mohamed,

No, this is for continuous time only. However, Dr. Dan Ellis of Columbia University has an example of a numerical inverse z-transform written in MATLAB located here:

Note that this type of inversion is notoriously tricky to do numerically, as it requires very precise numbers. Working with the Symbolic Toolbox allows you to request arbitrary precision (e.g., 64 digits of precision).

Hope that helps!

- Tucker

Comment only
15 Mar 2013 Mohamed Yassin OUKILA

Can we apply these functions to a discrete function?
Thank you :)

Comment only
20 Feb 2013 abdo mecha


Comment only

Contact us