Syntax
plot(x, y), plot(x1, y1, x2, y2,…,xn, yn), hold on
plot(x, y) creates a 2-D line plot of the data in 𝑦 versus the corresponding values in 𝑥. hold on retains plots in the current
axes so that new plots added to the axes do not delete existing plots.
Syntax
[r, p, k] = residue(num, den)
where num and den are arrays containing the coefficients of the numerator and denominator of 𝑋(𝑠). The output of the
function consists of the array 𝑟, which contains the residues, the array 𝑝, which contains the poles, and the array 𝐾, which
S. K. Armah, Ph.D. Page 1 of 5
contains the coefficients of the direct term 𝐾(𝑠) in polynomial form. Note that the order in which the residues are displayed
corresponds to the order in which the poles are displayed.
OR
5 4
𝑋(𝑠) = 6𝑠 + 3 + +
𝑠+7 𝑠+2
The response, using tables, is
𝑑
𝑥(𝑡) = 6 𝛿(𝑡) + 3𝛿(𝑡) + 5𝑒 −7𝑡 + 4𝑒 −2𝑡
𝑑𝑡
➢ Try
𝑠+3
(1) 𝑋(𝑠) = =
(𝑠 + 1)(𝑠 + 2)
𝑥(𝑡) =
𝑠 4 + 2𝑠 3 + 3𝑠 2 + 4𝑠 + 5
(2) 𝑋(𝑠) = =
𝑠2 + 𝑠
𝑥(𝑡) =
➢ Try
𝑠 2 + 2𝑠 + 3
(1) 𝑋(𝑠) = =
(𝑠 + 1)3
𝑥(𝑡) =
5(𝑠 + 2)
(2) 𝑋(𝑠) = =
𝑠 2 (𝑠+ 1)(𝑠 + 3)
𝑥(𝑡) =
2𝑠 + 12
𝑋(𝑠) = =
𝑠2 + 2𝑠 + 5
𝑥(𝑡) =
Syntax
laplace (f) and ilaplace(F)
laplace(f) returns the Laplace Transform of 𝑓. By default, the independent variable is 𝑡 and transformation variable is 𝑠.
ilaplace(F) returns the Inverse Laplace Transform of 𝐹. By default, the independent variable is 𝑠 and the transformation
variable is 𝑡. For example,
𝑓(𝑡) = 5𝑒 −2𝑡
syms t
f = 5*exp(-2*t);
laplace(f)
OR
laplace(5*exp(-2*t))
which gives
5
ans =
𝑠+2
Similarly, given
7
𝐹(𝑠) = 2
(𝑠 − 3)
S. K. Armah, Ph.D. Page 4 of 5
syms s
F = 7/(s – 3)^2;
ilaplace(F)
OR
ilaplace(7/(s – 3)^2)
which gives
ans = 7𝑡𝑒 3𝑡
➢ Try
(2) ℒ [𝑐𝑜𝑠2𝑡 𝑒 2𝑡 ] =
1 0
𝑑𝑓
(3) ℒ [ ]=
𝑑𝑡
−1
𝑒 −2𝑠
(4) ℒ [ 2 ]=
𝑠 +1
𝑠 0
(5) ℒ −1 [ ]=
1 1/𝑠 2