Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please help with the following code, using laplace transform in matlab to solve

ID: 3782634 • Letter: P

Question

please help with the following code, using laplace transform in matlab to solve the problem, I just cant figure it out how to put the step function on the ODE and solve thanks

syms s t Y;

warning('off')

t=0:0.001:10;

h=4*t.*(heaviside(t)-heaviside(t-1))+4*(heaviside(t-1))

figure (4)

plot(t,h);axis([0,10,0,6])

ode='D(D(y))(t)+4*y(t)=h';

solg=laplace(ode,t,s);

solp=subs(solg,{'laplace(y(t),h,t,s)','y(0)','D(y)(0)'},{Y,1,0});

Y=(solve(solp,Y))

yt=ilaplace(Y,s,t)

figure (5)

fplot(yt,[0 10])

title('ODE Solution')

xlabel ('Time [sec] ')

ylabel( 'Amplitude [m]')

Explanation / Answer

solg=laplace(ode,t,s);

it the above line 's' is not given. Please try by giving s value in the program