Laplace transform




laplace(f,trans_var,eval_point) computes the Laplace transform of f with respect to the transformation variable trans_var at the point eval_point.

Input Arguments


Symbolic expression, symbolic function, or vector or matrix of symbolic expressions or functions.


Symbolic variable representing the transformation variable. This variable is often called the "time variable".

Default: The variable t. If f does not contain t, then the default variable is determined by symvar.


Symbolic variable or expression representing the evaluation point. This variable is often called the "complex frequency variable".

Default: The variable s. If s is the transformation variable of f, then the default evaluation point is the variable z.


Compute the Laplace transform of this expression with respect to the variable x at the evaluation point y:

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

Compute the Laplace transform of this expression calling the laplace function with one argument. If you do not specify the transformation variable, laplace uses the variable t.

syms a t y
f = exp(-a*t);
laplace(f, y)
ans =
1/(a + y)

If you also do not specify the evaluation point, laplace uses the variable s:

ans =
1/(a + s)

Compute the following Laplace transforms that involve the Dirac and Heaviside functions:

syms t s
laplace(dirac(t - 3), t, s)
ans =
laplace(heaviside(t - pi), t, s)
ans =

If laplace cannot find an explicit representation of the transform, it returns an unevaluated call:

syms f(t) s
F = laplace(f, t, s)
F =
laplace(f(t), t, s)

ilaplace returns the original expression:

ilaplace(F, s, t)
ans =

The Laplace transform of a function is related to the Laplace transform of its derivative:

syms f(t) s
laplace(diff(f(t), t), t, s)
ans =
s*laplace(f(t), t, s) - f(0)

Find the Laplace transform of this matrix. Use matrices of the same size to specify the transformation variable and evaluation point.

syms a b c d w x y z
laplace([exp(x), 1; sin(y), i*z],[w, x; y, z],[a, b; c, d])
ans =
[    exp(x)/a,   1/b]
[ 1/(c^2 + 1), 1i/d^2]

When the input arguments are nonscalars, laplace acts on them element-wise. If laplace is called with both scalar and nonscalar arguments, then laplace expands the scalar arguments into arrays of the same size as the nonscalar arguments with all elements of the array equal to the scalar.

syms w x y z a b c d
laplace(x,[x, w; y, z],[a, b; c, d])
ans =
[ 1/a^2, x/b]
[   x/c, x/d]

Note that nonscalar input arguments must have the same size.

When the first argument is a symbolic function, the second argument must be a scalar.

syms f1(x) f2(x) a b
f1(x) = exp(x);
f2(x) = x;
laplace([f1, f2],x,[a, b])
ans =
[ 1/(a - 1), 1/b^2]

More About

expand all

Laplace Transform

The Laplace transform is defined as follows:



  • If you call laplace with two arguments, it assumes that the second argument is the evaluation point eval_point.

  • If f is a matrix, laplace acts element-wise on all components of the matrix.

  • If eval_point is a matrix, laplace acts element-wise on all components of the matrix.

  • To compute the inverse Laplace transform, use ilaplace.

Introduced before R2006a

Was this topic helpful?