MATLAB: I want to know what does it mean by the term including “laplace” word in Laplace Transform

laplace transform

When I tried to solve an eqn analytically using Laplace Transform, the soln included the term laplace(qpl(t), t, s).
I do not know what does this mean?
The commands I entered as following:
>> clear E
>> syms fplc Rc Nc0 Kgr fplh Rh Nh0 Kel real
>> syms qpl(t) s
>> dqpl(t) = diff(qpl(t),t);
>> dqpl(t)= fplc*Rc*Nc0*exp(Kgr*t)+fplh*Rh*Nh0-Kel*qpl(t);
>> L(t)=laplace(dqpl(t),t,s)
L(t) =
(Nh0*Rh*fplh)/s - Kel*laplace(qpl(t), t, s) - (Nc0*Rc*fplc)/(Kgr - s)

Best Answer

The Symbolic Math Toolbox denotes ‘laplace(qpl(t), t, s)’ as the Laplace transform of the ‘qpl(t)’ function. If you want to denote it in a more traditional form, use the subs function:
L(s) = laplace(dqpl(t),t,s)
L(s) =
(Nh0*Rh*fplh)/s - Kel*laplace(qpl(t), t, s) - (Nc0*Rc*fplc)/(Kgr - s)
L(s) = subs(L(s), {laplace(qpl(t), t, s)}, {QPL(s)})
L(s) =
(Nh0*Rh*fplh)/s - Kel*QPL(s) - (Nc0*Rc*fplc)/(Kgr - s)
This replaces ‘laplace(qpl(t), t, s)’ with ‘QPL(s)’. It is usually good to do this, expecially if you want to simplify your equation or solve for ‘QPL(s)’ later in your code, for example to calculate a transfer function.