ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.7 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://www.mathworks.com/help/symbolic/sym.laplace.html |
| Last Crawled | 2026-03-28 03:08:08 (21 days ago) |
| First Indexed | 2021-03-12 01:39:27 (5 years ago) |
| HTTP Status Code | 200 |
| Meta Title | laplace - Laplace transform - MATLAB |
| Meta Description | This MATLAB function returns the Laplace Transform of f. |
| Meta Canonical | null |
| Boilerpipe Text | Laplace transform
Description
F
= laplace(
f
)
returns the
Laplace Transform
of
f
. By default, the independent variable is
t
and the transformation variable is
s
.
example
F
= laplace(
f
,
transVar
)
uses the transformation variable
transVar
instead of
s
.
example
F
= laplace(
f
,
var
,
transVar
)
uses the independent variable
var
and the transformation
variable
transVar
instead of
t
and
s
, respectively.
example
Examples
collapse all
Compute the Laplace transform of
1/sqrt(x)
. By default, the transform is in terms of
s
.
syms
x
y
f = 1/sqrt(x);
F = laplace(f)
F =
π
s
Compute the Laplace transform of
exp(-a*t)
. By default, the independent variable is
t
, and the transformation variable is
s
.
syms
a
t
y
f = exp(-a*t);
F = laplace(f)
F =
1
a
+
s
Specify the transformation variable as
y
. If you specify only one variable, that variable is the transformation variable. The independent variable is still
t
.
F = laplace(f,y)
F =
1
a
+
y
Specify both the independent and transformation variables as
a
and
y
in the second and third arguments, respectively.
F = laplace(f,a,y)
F =
1
t
+
y
Compute the Laplace transforms of the Dirac and Heaviside functions.
syms
t
s
syms
a
positive
F = laplace(dirac(t-a),t,s)
F =
e
-
a
s
F = laplace(heaviside(t-a),t,s)
F =
e
-
a
s
s
Show that the Laplace transform of the derivative of a function is expressed in terms of the Laplace transform of the function itself.
syms
f(t)
s
Df = diff(f(t),t);
F = laplace(Df,t,s)
F =
s
laplace
(
f
(
t
)
,
t
,
s
)
-
f
(
0
)
Find the Laplace transform of the matrix
M
. Specify the independent and transformation variables for each matrix entry by using matrices of the same size. When the arguments are nonscalars,
laplace
acts on them element-wise.
syms
a
b
c
d
w
x
y
z
M = [exp(x) 1; sin(y) 1i*z];
vars = [w x; y z];
transVars = [a b; c d];
F = laplace(M,vars,transVars)
F =
(
e
x
a
1
b
1
c
2
+
1
i
d
2
)
If
laplace
is called with both scalar and nonscalar arguments, then it expands the scalars to match the nonscalars by using scalar expansion. Nonscalar arguments must be the same size.
F = laplace(x,vars,transVars)
F =
(
x
a
1
b
2
x
c
x
d
)
Compute the Laplace transform of symbolic functions. When the first argument contains symbolic functions, then the second argument must be a scalar.
syms
f1(x)
f2(x)
a
b
f1(x) = exp(x);
f2(x) = x;
F = laplace([f1 f2],x,[a b])
F =
(
1
a
-
1
1
b
2
)
If
laplace
cannot transform the input then it returns an unevaluated call.
syms
f(t)
s
f(t) = 1/t;
F(s) = laplace(f,t,s)
F(s) =
laplace
(
1
t
,
t
,
s
)
Return the original expression by using
ilaplace
.
f(t) = ilaplace(F,s,t)
f(t) =
1
t
Input Arguments
collapse all
Input, specified as a symbolic expression, function, vector, or
matrix.
Independent variable, specified as a symbolic variable. This variable is
often called the "time variable" or the "space variable." If you do not
specify the variable then, by default,
laplace
uses
t
. If
f
does not contain
t
, then
laplace
uses the
function
symvar
to determine the independent
variable.
Transformation variable, specified as a symbolic variable, expression,
vector, or matrix. This variable is often called the "complex frequency
variable." If you do not specify the variable then, by default,
laplace
uses
s
. If
s
is the independent variable of
f
, then
laplace
uses
z
.
More About
collapse all
The Laplace transform
F
(
s
)
of the expression
f
(
t
)
with respect to the variable
t
at the point
s
is a unilateral transform defined by
Tips
If any argument is an array, then
laplace
acts
element-wise on all elements of the array.
If the first argument contains a symbolic function, then the second argument
must be a scalar.
To compute the inverse Laplace transform, use
ilaplace
.
Algorithms
The Laplace transform is defined as a unilateral or one-sided transform. This
definition assumes that the signal
f
(
t
)
is only defined for all real numbers
t
≥ 0
, or
f
(
t
) = 0
for
t
< 0
. Therefore, for a generalized signal with
f
(
t
) ≠ 0
for
t
< 0
, the Laplace transform of
f
(
t
)
gives the same result as if
f
(
t
)
is multiplied by a Heaviside step function.
For example, both of these code blocks:
syms
t
;
laplace(sin(t))
and
syms
t
;
laplace(sin(t)*heaviside(t))
return
1/(s^2 + 1)
.
Version History
Introduced before R2006a
How useful was this information?
Unrated
1 star
2 stars
3 stars
4 stars
5 stars |
| Markdown | [Skip to content](https://www.mathworks.com/help/symbolic/sym.laplace.html#main)
[](https://www.mathworks.com/?s_tid=user_nav_logo)
[MATLAB Help Center](https://www.mathworks.com/help/?s_tid=user_nav_help)
- [MATLAB Help Center](https://www.mathworks.com/help/?s_tid=user_nav_help)
- [Community](https://www.mathworks.com/matlabcentral/?s_tid=user_nav_community)
- [Learning](https://matlabacademy.mathworks.com/?s_tid=user_nav_learning)
- [Get MATLAB](https://login.mathworks.com/embedded-login/landing.html?cid=getmatlab&s_tid=user_nav_getml) [MATLAB](https://login.mathworks.com/embedded-login/landing.html?cid=getmatlab&s_tid=user_nav_getml)
- [Sign In](https://www.mathworks.com/login?uri=https%3A%2F%2Fwww.mathworks.com%2Fhelp%2Fsymbolic%2Fsym.laplace.html)
- [My Account]()
- [My Community Profile]()
- [Link License]()
- ***
- [Sign Out]()
- [Contact MathWorks Support](https://www.mathworks.com/support/contact_us.html)
- [Visit mathworks.com](https://www.mathworks.com/)
- - [ MATLAB](https://matlab.mathworks.com/)
- [ Help Center](https://www.mathworks.com/help/)
- [ MathWorks](https://www.mathworks.com/)
- [ MATLAB Answers](https://www.mathworks.com/matlabcentral/answers/index)
- [ File Exchange](https://www.mathworks.com/matlabcentral/fileexchange)
- [ Videos](https://www.mathworks.com/videos.html)
- [ Online Training](https://matlabacademy.mathworks.com/)
- [ Blogs](https://blogs.mathworks.com/)
- [ Cody](https://www.mathworks.com/matlabcentral/cody)
- [ MATLAB Drive](https://drive.mathworks.com/)
- [ ThingSpeak](https://thingspeak.com/)
- [ Bug Reports](https://www.mathworks.com/support/bugreports/)
- [ Community](https://www.mathworks.com/matlabcentral/)
Off-Canvas Navigation Menu Toggle Contents
1. [Documentation Home](https://www.mathworks.com/help/index.html?s_tid=CRUX_lftnav)
1. [Mathematics and Optimization](https://www.mathworks.com/help/overview/mathematics-and-optimization.html?s_tid=hc_product_group_bc)
1. [Symbolic Math Toolbox](https://www.mathworks.com/help/symbolic/index.html?s_tid=CRUX_lftnav)
2. [Mathematics](https://www.mathworks.com/help/symbolic/mathematics.html?s_tid=CRUX_lftnav)
3. [Calculus](https://www.mathworks.com/help/symbolic/calculus.html?s_tid=CRUX_lftnav)
- laplace
- On this page
- [Syntax](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266166)
- [Description](https://www.mathworks.com/help/symbolic/sym.laplace.html#description)
- [Examples](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266245)
- [Laplace Transform of Symbolic Expression](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_ab29ba7c-c6bc-4427-9590-095873d039d5)
- [Specify Independent Variable and Transformation Variable](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_f371bf19-fe52-4f7e-92e2-32464f819335)
- [Laplace Transforms of Dirac and Heaviside Functions](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_4f3dac42-6a50-45c6-87b6-940cd6060258)
- [Relation Between Laplace Transform of Function and Its Derivative](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_87a5aa1a-bf7e-4612-810f-d3f98513a212)
- [Laplace Transform of Array Inputs](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_580c9f73-b9db-4803-939f-a24742e95023)
- [Laplace Transform of Symbolic Function](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_81e6639d-3c84-4c84-9426-2e28a1cb734d)
- [If Laplace Transform Cannot Be Found](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_bfa6d5f7-833b-4424-8a5f-0c84c4731631)
- [Input Arguments](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266749)
- [f](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266753)
- [var](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266776)
- [transVar](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266810)
- [More About](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266869)
- [Laplace Transform](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_d8b5d523-43d3-4d19-9285-2d39828e1356)
- [Tips](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266854)
- [Algorithms](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_9b0d4f01-b0d9-4b0a-9141-e44a7335cbd4)
- [Version History](https://www.mathworks.com/help/symbolic/sym.laplace.html#btfobhn_vh)
- [See Also](https://www.mathworks.com/help/symbolic/sym.laplace.html#btfobhn_seealso)
- [Documentation](https://www.mathworks.com/help/symbolic/calculus.html?s_tid=CRUX_topnav)
- [Examples](https://www.mathworks.com/help/symbolic/examples.html?s_tid=CRUX_topnav&category=calculus)
- [Functions](https://www.mathworks.com/help/symbolic/referencelist.html?type=function&s_tid=CRUX_topnav&category=calculus)
- [Videos](https://www.mathworks.com/support/search.html?fq%5B%5D=asset_type_name:video&fq%5B%5D=category:symbolic/calculus&page=1&s_tid=CRUX_topnav)
- [Answers](https://www.mathworks.com/support/search.html?fq%5B%5D=asset_type_name:answer&fq%5B%5D=category:symbolic/calculus&page=1&s_tid=CRUX_topnav)
Main Content
# laplace
Laplace transform
[collapse all in page]()
## Syntax
`F = laplace(f)`
`F = laplace(f,transVar)`
`F = laplace(f,var,transVar)`
## Description
`F = laplace(f)` returns the [Laplace Transform](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_d8b5d523-43d3-4d19-9285-2d39828e1356) of `f`. By default, the independent variable is `t` and the transformation variable is `s`.
[example](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_ab29ba7c-c6bc-4427-9590-095873d039d5)
`F = laplace(f,transVar)` uses the transformation variable `transVar` instead of `s`.
[example](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_f371bf19-fe52-4f7e-92e2-32464f819335)
`F = laplace(f,var,transVar)` uses the independent variable `var` and the transformation variable `transVar` instead of `t` and `s`, respectively.
[example](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_4f3dac42-6a50-45c6-87b6-940cd6060258)
## Examples
[collapse all]()
### Laplace Transform of Symbolic Expression
[Open Live Script](matlab:openExample\('symbolic/LaplaceTransformOfSymbolicExpressionExample'\))
Compute the Laplace transform of `1/sqrt(x)`. By default, the transform is in terms of `s`.
```
syms x y
f = 1/sqrt(x);
F = laplace(f)
```
```
F =
π s
```
### Specify Independent Variable and Transformation Variable
[Open Live Script](matlab:openExample\('symbolic/SpecifyIndependentVariableAndTransformationVariableExample'\))
Compute the Laplace transform of `exp(-a*t)`. By default, the independent variable is `t`, and the transformation variable is `s`.
```
syms a t y
f = exp(-a*t);
F = laplace(f)
```
```
F =
1 a + s
```
Specify the transformation variable as `y`. If you specify only one variable, that variable is the transformation variable. The independent variable is still `t`.
```
F = laplace(f,y)
```
```
F =
1 a + y
```
Specify both the independent and transformation variables as `a` and `y` in the second and third arguments, respectively.
```
F = laplace(f,a,y)
```
```
F =
1 t + y
```
### Laplace Transforms of Dirac and Heaviside Functions
[Open Live Script](matlab:openExample\('symbolic/LaplaceTransformsOfDiracAndHeavisideFunctionsExample'\))
Compute the Laplace transforms of the Dirac and Heaviside functions.
```
syms t s
syms a positive
F = laplace(dirac(t-a),t,s)
```
```
F = e - a s
```
```
F = laplace(heaviside(t-a),t,s)
```
```
F =
e - a s s
```
### Relation Between Laplace Transform of Function and Its Derivative
[Open Live Script](matlab:openExample\('symbolic/LaplaceTransformOfFunctionAndItsDerivativeExample'\))
Show that the Laplace transform of the derivative of a function is expressed in terms of the Laplace transform of the function itself.
```
syms f(t) s
Df = diff(f(t),t);
F = laplace(Df,t,s)
```
```
F = s laplace ( f ( t ) , t , s ) - f ( 0 )
```
### Laplace Transform of Array Inputs
[Open Live Script](matlab:openExample\('symbolic/LaplaceTransformOfArrayInputsExample'\))
Find the Laplace transform of the matrix `M`. Specify the independent and transformation variables for each matrix entry by using matrices of the same size. When the arguments are nonscalars, `laplace` acts on them element-wise.
```
syms a b c d w x y z
M = [exp(x) 1; sin(y) 1i*z];
vars = [w x; y z];
transVars = [a b; c d];
F = laplace(M,vars,transVars)
```
```
F =
( e x a 1 b 1 c 2 + 1 i d 2 )
```
If `laplace` is called with both scalar and nonscalar arguments, then it expands the scalars to match the nonscalars by using scalar expansion. Nonscalar arguments must be the same size.
```
F = laplace(x,vars,transVars)
```
```
F =
( x a 1 b 2 x c x d )
```
### Laplace Transform of Symbolic Function
[Open Live Script](matlab:openExample\('symbolic/LaplaceTransformOfSymbolicFunctionExample'\))
Compute the Laplace transform of symbolic functions. When the first argument contains symbolic functions, then the second argument must be a scalar.
```
syms f1(x) f2(x) a b
f1(x) = exp(x);
f2(x) = x;
F = laplace([f1 f2],x,[a b])
```
```
F =
( 1 a - 1 1 b 2 )
```
### If Laplace Transform Cannot Be Found
[Open Live Script](matlab:openExample\('symbolic/IfLaplaceTransformCannotBeFoundExample'\))
If `laplace` cannot transform the input then it returns an unevaluated call.
```
syms f(t) s
f(t) = 1/t;
F(s) = laplace(f,t,s)
```
```
F(s) =
laplace ( 1 t , t , s )
```
Return the original expression by using `ilaplace`.
```
f(t) = ilaplace(F,s,t)
```
```
f(t) =
1 t
```
## Input Arguments
[collapse all]()
### `f` — Input symbolic expression \| symbolic function \| symbolic vector \| symbolic matrix
Input, specified as a symbolic expression, function, vector, or matrix.
### `var` — Independent variable `t` (default) \| symbolic variable
Independent variable, specified as a symbolic variable. This variable is often called the "time variable" or the "space variable." If you do not specify the variable then, by default, `laplace` uses `t`. If [`f`](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266753) does not contain `t`, then `laplace` uses the function `symvar` to determine the independent variable.
### `transVar` — Transformation variable `s` (default) \| `z` \| symbolic variable \| symbolic expression \| symbolic vector \| symbolic matrix
Transformation variable, specified as a symbolic variable, expression, vector, or matrix. This variable is often called the "complex frequency variable." If you do not specify the variable then, by default, `laplace` uses `s`. If `s` is the independent variable of [`f`](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266753), then `laplace` uses `z`.
## More About
[collapse all]()
### Laplace Transform
The Laplace transform *F*(*s*) of the expression *f*(*t*) with respect to the variable *t* at the point *s* is a unilateral transform defined by
F ( s ) \= ∫ 0 – ∞ f ( t ) e − s t d t .
## Tips
- If any argument is an array, then `laplace` acts element-wise on all elements of the array.
- If the first argument contains a symbolic function, then the second argument must be a scalar.
- To compute the inverse Laplace transform, use `ilaplace`.
## Algorithms
The Laplace transform is defined as a unilateral or one-sided transform. This definition assumes that the signal *f*(*t*) is only defined for all real numbers *t* ≥ 0, or *f*(*t*) = 0 for *t* \< 0. Therefore, for a generalized signal with *f*(*t*) ≠ 0 for *t* \< 0, the Laplace transform of *f*(*t*) gives the same result as if *f*(*t*) is multiplied by a Heaviside step function.
For example, both of these code blocks:
```
syms t;
laplace(sin(t))
```
and
```
syms t;
laplace(sin(t)*heaviside(t))
```
return `1/(s^2 + 1)`.
## Version History
**Introduced before R2006a**
## See Also
[`fourier`](https://www.mathworks.com/help/symbolic/sym.fourier.html) \| [`ifourier`](https://www.mathworks.com/help/symbolic/sym.ifourier.html) \| [`ilaplace`](https://www.mathworks.com/help/symbolic/sym.ilaplace.html) \| [`iztrans`](https://www.mathworks.com/help/symbolic/sym.iztrans.html) \| [`ztrans`](https://www.mathworks.com/help/symbolic/sym.ztrans.html)
### Topics
- [Solve Differential Equations of RLC Circuit Using Laplace Transform](https://www.mathworks.com/help/symbolic/solve-differential-equations-using-laplace-transform.html)
Thank you for your feedback\!
Why did you choose this rating?
Submit
How useful was this information?
Unrated
1 star
2 stars
3 stars
4 stars
5 stars
## MATLAB Command
You clicked a link that corresponds to this MATLAB command:
```
```
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Close
 
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: **United States**.
[United States](https://www.mathworks.com/)
- [**United States** (English)](https://ch.mathworks.com/)
- [**United States** (Deutsch)](https://ch.mathworks.com/)
- [**United States** (Français)](https://ch.mathworks.com/)
- [**United States**(简体中文)](https://ww2.mathworks.cn/)
- [**United States** (English)](https://ww2.mathworks.cn/)
You can also select a web site from the following list
**How to Get Best Site Performance**
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- [América Latina](https://la.mathworks.com/) (Español)
- [Canada](https://www.mathworks.com/) (English)
- [United States](https://www.mathworks.com/) (English)
Europe
- [Belgium](https://nl.mathworks.com/) (English)
- [Denmark](https://se.mathworks.com/) (English)
- [Deutschland](https://de.mathworks.com/) (Deutsch)
- [España](https://es.mathworks.com/) (Español)
- [Finland](https://se.mathworks.com/) (English)
- [France](https://fr.mathworks.com/) (Français)
- [Ireland](https://uk.mathworks.com/) (English)
- [Italia](https://it.mathworks.com/) (Italiano)
- [Luxembourg](https://nl.mathworks.com/) (English)
- [Netherlands](https://nl.mathworks.com/) (English)
- [Norway](https://se.mathworks.com/) (English)
- [Österreich](https://de.mathworks.com/) (Deutsch)
- [Portugal](https://www.mathworks.com/) (English)
- [Sweden](https://se.mathworks.com/) (English)
- Switzerland
- [Deutsch](https://ch.mathworks.com/)
- [English](https://ch.mathworks.com/)
- [Français](https://ch.mathworks.com/)
- [United Kingdom](https://uk.mathworks.com/) (English)
Asia Pacific
- [Australia](https://au.mathworks.com/) (English)
- [India](https://in.mathworks.com/) (English)
- [New Zealand](https://au.mathworks.com/) (English)
- 中国
- [简体中文](https://ww2.mathworks.cn/)
- [English](https://ww2.mathworks.cn/)
- [日本](https://jp.mathworks.com/) (日本語)
- [한국](https://kr.mathworks.com/) (한국어)
[Contact your local office](https://www.mathworks.com/)
- [Trust Center](https://www.mathworks.com/company/trust-center.html?s_tid=gf_tc)
- [Trademarks](https://www.mathworks.com/company/trust-center/trademarks.html?s_tid=gf_trd)
- [Privacy Policy](https://www.mathworks.com/company/trust-center/privacy-policy.html?s_tid=gf_priv)
- [Preventing Piracy](https://www.mathworks.com/company/trust-center/piracy.html?s_tid=gf_pir)
- [Application Status](https://status.mathworks.com/?s_tid=gf_application)
- [Contact Us](https://www.mathworks.com/company/aboutus/contact_us.html?s_tid=gf_contact)
© 1994-2026 The MathWorks, Inc.
Select a Web Site United States |
| Readable Markdown | Laplace transform
## Description
`F = laplace(f)` returns the [Laplace Transform](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_d8b5d523-43d3-4d19-9285-2d39828e1356) of `f`. By default, the independent variable is `t` and the transformation variable is `s`.
[example](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_ab29ba7c-c6bc-4427-9590-095873d039d5)
`F = laplace(f,transVar)` uses the transformation variable `transVar` instead of `s`.
[example](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_f371bf19-fe52-4f7e-92e2-32464f819335)
`F = laplace(f,var,transVar)` uses the independent variable `var` and the transformation variable `transVar` instead of `t` and `s`, respectively.
[example](https://www.mathworks.com/help/symbolic/sym.laplace.html#mw_4f3dac42-6a50-45c6-87b6-940cd6060258)
## Examples
collapse all
Compute the Laplace transform of `1/sqrt(x)`. By default, the transform is in terms of `s`.
```
syms x y
f = 1/sqrt(x);
F = laplace(f)
```
```
F =
π s
```
Compute the Laplace transform of `exp(-a*t)`. By default, the independent variable is `t`, and the transformation variable is `s`.
```
syms a t y
f = exp(-a*t);
F = laplace(f)
```
```
F =
1 a + s
```
Specify the transformation variable as `y`. If you specify only one variable, that variable is the transformation variable. The independent variable is still `t`.
```
F = laplace(f,y)
```
```
F =
1 a + y
```
Specify both the independent and transformation variables as `a` and `y` in the second and third arguments, respectively.
```
F = laplace(f,a,y)
```
```
F =
1 t + y
```
Compute the Laplace transforms of the Dirac and Heaviside functions.
```
syms t s
syms a positive
F = laplace(dirac(t-a),t,s)
```
```
F = e - a s
```
```
F = laplace(heaviside(t-a),t,s)
```
```
F =
e - a s s
```
Show that the Laplace transform of the derivative of a function is expressed in terms of the Laplace transform of the function itself.
```
syms f(t) s
Df = diff(f(t),t);
F = laplace(Df,t,s)
```
```
F = s laplace ( f ( t ) , t , s ) - f ( 0 )
```
Find the Laplace transform of the matrix `M`. Specify the independent and transformation variables for each matrix entry by using matrices of the same size. When the arguments are nonscalars, `laplace` acts on them element-wise.
```
syms a b c d w x y z
M = [exp(x) 1; sin(y) 1i*z];
vars = [w x; y z];
transVars = [a b; c d];
F = laplace(M,vars,transVars)
```
```
F =
( e x a 1 b 1 c 2 + 1 i d 2 )
```
If `laplace` is called with both scalar and nonscalar arguments, then it expands the scalars to match the nonscalars by using scalar expansion. Nonscalar arguments must be the same size.
```
F = laplace(x,vars,transVars)
```
```
F =
( x a 1 b 2 x c x d )
```
Compute the Laplace transform of symbolic functions. When the first argument contains symbolic functions, then the second argument must be a scalar.
```
syms f1(x) f2(x) a b
f1(x) = exp(x);
f2(x) = x;
F = laplace([f1 f2],x,[a b])
```
```
F =
( 1 a - 1 1 b 2 )
```
If `laplace` cannot transform the input then it returns an unevaluated call.
```
syms f(t) s
f(t) = 1/t;
F(s) = laplace(f,t,s)
```
```
F(s) =
laplace ( 1 t , t , s )
```
Return the original expression by using `ilaplace`.
```
f(t) = ilaplace(F,s,t)
```
```
f(t) =
1 t
```
## Input Arguments
collapse all
Input, specified as a symbolic expression, function, vector, or matrix.
Independent variable, specified as a symbolic variable. This variable is often called the "time variable" or the "space variable." If you do not specify the variable then, by default, `laplace` uses `t`. If [`f`](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266753) does not contain `t`, then `laplace` uses the function `symvar` to determine the independent variable.
Transformation variable, specified as a symbolic variable, expression, vector, or matrix. This variable is often called the "complex frequency variable." If you do not specify the variable then, by default, `laplace` uses `s`. If `s` is the independent variable of [`f`](https://www.mathworks.com/help/symbolic/sym.laplace.html#d126e266753), then `laplace` uses `z`.
## More About
collapse all
The Laplace transform *F*(*s*) of the expression *f*(*t*) with respect to the variable *t* at the point *s* is a unilateral transform defined by
## Tips
- If any argument is an array, then `laplace` acts element-wise on all elements of the array.
- If the first argument contains a symbolic function, then the second argument must be a scalar.
- To compute the inverse Laplace transform, use `ilaplace`.
## Algorithms
The Laplace transform is defined as a unilateral or one-sided transform. This definition assumes that the signal *f*(*t*) is only defined for all real numbers *t* ≥ 0, or *f*(*t*) = 0 for *t* \< 0. Therefore, for a generalized signal with *f*(*t*) ≠ 0 for *t* \< 0, the Laplace transform of *f*(*t*) gives the same result as if *f*(*t*) is multiplied by a Heaviside step function.
For example, both of these code blocks:
```
syms t;
laplace(sin(t))
```
and
```
syms t;
laplace(sin(t)*heaviside(t))
```
return `1/(s^2 + 1)`.
## Version History
**Introduced before R2006a**
How useful was this information?
Unrated1 star2 stars3 stars4 stars5 stars |
| Shard | 161 (laksa) |
| Root Hash | 11303084394109755361 |
| Unparsed URL | com,mathworks!www,/help/symbolic/sym.laplace.html s443 |