Does anyone know how to get the inverse laplace transform in MATLAB? Ideally entering the Laplace form of the equation, and getting the output in the time domain. Thanks!! P.S. if you have an example you're willing to share that would be appreciated!
Neeta Dsouza answered .
2025-11-20
syms H(s) s t H(s) = (s^2 + 3*s + 5)/(s^3 + 5*s^2 +6*s + 9); Hpf = partfrac(H) h(t) = vpa(ilaplace(Hpf,s,t)) hfcn = matlabFunction(h)
producing
h(t) = 0.6241318855835944579323146742924*exp(-4.0690229960401146971234049368325*t) + 0.3758681144164055420676853257076*exp(-0.46548850197994265143829753158373*t)*cos(1.4124990678323177947660216914026*t) + 0.50589008998062620975227487302694*exp(-0.46548850197994265143829753158373*t)*sin(1.4124990678323177947660216914026*t)
and (after a bit of editing):
hfcn = @(t)exp(t.*-4.069022996040115).*6.241318855835945e-1+exp(t.*-4.654885019799427e-1).*cos(t.*1.412499067832318).*3.758681144164055e-1+exp(t.*-4.654885019799427e-1).*sin(t.*1.412499067832318).*5.058900899806262e-1