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

 3. Modify the M-file euler.m to implement the algorithm for Improved

3. Modify the M-file euler.m to implement the algorithm for Improved Euler. Call the new file impeuler.m (include the file in your report). Test your code for the IVP y' = 0.6 y, y(0) = -2, in the interval (0,5), using N = 10 steps. First enter the function f(t,y) = 0.6 y as anonymous function and then enter the following: >> [t10, y10] = impeuler (f, [0,5], -2,10); % use of if defined in separate m-file >> [t10, y10] ans = 0 -2.0000 0.5000 -2.6900 1.0000 -3.6181 1.5000 -4.8663 2.0000 -6.5451 2.5000 -8.8032 3.0000 -11.8403 3.5000 -15.9252 4.0000 -21.4194 4.5000 -28.8092 5.0000 -38.7483 Compare your output with the one above. You should obtain the same values

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!