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
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:

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 ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With