Problem 1.3.3
Problem 1.3.3. An example of using euler.m to approximate the solution of an ODE for different stepsizes and compare with the exact solution. function [X, Y] = eul1_3(x,y,x1,n) h = (x1-x)/n; X = x; Y = y; for i = 1:n k = f(x,y); x = x + h; y = y + h*k;
46 views • 4 slides