Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Alright everyone posted in my code for exercise 1. also posted is the command window. You can see its only having results for a few
Alright everyone posted in my code for exercise 1. also posted is the command window. You can see its only having results for a few things. I need help with this. Am i using end at the right time? Also posted is the requirements for this exercise. help please. thank you
12 13 14 15 16 % ODE function f for ODE dy/dt = f(t,y) f= inline ( 3 * y' , 't', 'y'); = 3y. % vector t analytical solution vector. t-linspace (0, . 5, 100); y=2 * exp (3*t); 18 19 20- 21 % vector of analytical solution values at corresponding t values. [t50 ,y50]euler (f, [O, .5],2, 50); [t50 (end-10:end) ;y50 (end-10:end) ]: 23 24 25 26 27 28 29- 30 31 32 % defines the exact solution of the ODE % solves the ODE using Euler with 50 steps % IVP numerically using forward Euler's method with 5 time steps. [t5,y5] - euler (E, [o, .51,2, 5)- %IVP numerically using forward Euler's method with 50 time steps. [t50,y50] euler (f, [0,.5],2, 50)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started