Question: Matlab code Solve the following ODE: dtdy=y5etsin(5t) with y(0)=1 and t between 0 and 3 (inclusive) using the Euler, Heun and midpoint methods. Create a

Matlab code

Matlab code Solve the following ODE: dtdy=y5etsin(5t) with y(0)=1 and t between

Solve the following ODE: dtdy=y5etsin(5t) with y(0)=1 and t between 0 and 3 (inclusive) using the Euler, Heun and midpoint methods. Create a 1-by-3 subplot arrangement where each subplot contains the solutions of the 3 methods for h=0.5 (first subplot), h=0.2 (second subplot) and h=0.01 (third subplot). In addition, each subplot should plot the analytical solution of y=etcos(5t) using a step size of 0.001 and a line thickness of 3 . Remember to include a legend for each subplot. ONASH College D4140 Practical Session 10 Create a table using fprintf which displays the step size, the midpoint method solution for t=3 and the absolute difference between the midpoint method and the analytical solution at t=3. The table should look similar to the following

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!