Assuming you have the simbolic toolbox
clc;clear; %clean up command window and variables!!!! s=tf('s') %make s tf type H = (3*s + 1)/(s^2 + 2*s +5) %transfer functions of system X = 1/(s+3) %input Y=H*X %output [num,den]=tfdata(Y) %get the polinomial coeficients nums=poly2sym(num{:},'s') %get symbolic expressions dens=poly2sym(den{:},'s') % Yt=ilaplace(nums/dens) %get the inverse laplace transform %Yt=(cos(2*t) + sin(2*t)/2)/exp(t) - 1/exp(3*t) %my result %compare both expression in a graph tv=0:0.01:10; %make a time vector Yt0=subs(Yt,'t',tv); %get function values Yt1=1.118*exp(-tv).*cos(2*tv - 26.6) - exp(-3*tv); % clf;hold on; %create a clean figure and turn aditive ploting on plot(tv,Yt0) %matlab expression plot(tv,Yt1,'r') %your expression legend('my expression','your expression') %they are very similar
I'm not sure about the results!