Question: Modify line 6 of the matlab code to make it work X + Editor - C:Users||||||||||Desktopeuler2016.m Thomasalgorithm Tridiagonal MatrixAlgorithm.mxjacobimethod.mxeuler2016.mxeuler2016.mx 1 %Euler's Method for Solving Initial
Modify line 6 of the matlab code to make it work

X + Editor - C:\Users\||||||||||\Desktop\euler2016.m Thomasalgorithm Tridiagonal MatrixAlgorithm.mxjacobimethod.mxeuler2016.mxeuler2016.mx 1 %Euler's Method for Solving Initial Value Problems 2 %Use with ydot.m to evaluate rhs of differential equation 3 %Input : interval inter, initial value yo, number of steps n % Output: time steps t, solution y 5 % Example usage : euler2016 ( [0 7450], 2.75,148); function euler2016 (inter, yo, n) t(1)=inter (1); y (1)=y0; h=(inter (2)-inter (1)); 10 for i=1:n 11 - t(i+1)=t (i) +h; 12 - y(i+1)=eulerstep (t(i),y(i),h); 13 - plot(t,y); grid on 14 - xlabel('t'),ylabel ('h') 15 - title('Approximate solution by Eulers Method') 16 - end 17 - disp([' ']) 18 disp([' Time (s)' | Height (m)']) 19 disp (I' ']) 20 for i=n-5:n 21 - disp ([t(i) y(i)l) 22 end 4 5 6 78 san234599 34 3 IIIIIIIIIIII T Command Window New to MATLAB? See resources for Getting Started. >> euler2016 Not enough input arguments. Error in euler2016 (line 7) t(1)=inter (1); fx >>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
