Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using matlab to find Laplace transform

Tags:

matlab

f(t) = t*e^t when 0 <= t < 3

f(t) = 0 when 3 <= t

how to use Matlab to find Laplace transforms of functions which change according to different values of t

like image 747
Vincent Zhou Avatar asked Feb 27 '26 01:02

Vincent Zhou


2 Answers

MATLAB has a function called laplace, and we can calculate it like:

syms x y
f = 1/sqrt(x);
laplace(f)

But it will be a very long code when we turn f(x) like this problem into syms. Indeed, we can do this by using dirac and heaviside if we have to. Nevertheless, we could use this instead:

syms t s
f=t*exp((1-s)*t);
F=int(f,t,0,3)

It is because:

enter image description here

like image 99
Hunter Jiang Avatar answered Mar 02 '26 13:03

Hunter Jiang


If you are interested in a numerical implementation of the Laplace transform, you can download from Matlab's file exchange the following Numerical Transform and the inverse transform ...

like image 31
bla Avatar answered Mar 02 '26 13:03

bla