Question: Matlab Code 3. Modify the M-file euler.m to implement the algorithm for Improved Euler. Call the new file impeuler. de the file in your report).


Matlab Code
3. Modify the M-file euler.m to implement the algorithm for Improved Euler. Call the new file impeuler. de the file in your report). Test your code for the ODE y, 3y, y(0) 2. First enter the function f(t,y) 3y as anonym ous function and then enter the following: >> [t5.y5] -impeuler (f, [0, .5] ,2,5); % use @f if defined in separate function >t5,y5] 0 2.0000 0.1000 2.6900 0.2000 3.6181 0.3000 4.8663 0.4000 6.5451 0.5000 8.8032 Compare your output with the one above Note that the improved Euler approximation with 5 steps is already more accurate than the Euler approximation with 50 steps! (hence the "improved)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
