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

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]')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!