You are on page 1of 1

MATLAB Command Window Page 1

>> syms t s
>> f=2/5*exp(3*t)*(sin(t)+t^2+1)+1/5*exp(-3*t);
>> f=laplace(f,t,s)

f =

2/(5*(s - 3)) + 1/(5*(s + 3)) + 4/(5*(s - 3)^3) + 2/(5*((s - 3)^2 + 1))

>> simplify(f)

ans =

2/(5*(s - 3)) + 1/(5*(s + 3)) + 4/(5*(s - 3)^3) + 2/(5*((s - 3)^2 + 1))

>> pretty(f)
2 1 4 2
--------- + --------- + ---------- + ----------------
5 (s - 3) 5 (s + 3) 3 2
5 (s - 3) 5 ((s - 3) + 1)

>> pretty(ans)
2 1 4 2
--------- + --------- + ---------- + ----------------
5 (s - 3) 5 (s + 3) 3 2
5 (s - 3) 5 ((s - 3) + 1)

>>

You might also like