function [y_error] = euler1_errors(h) format long % x is an array of n elements where n = length (x) . Initial value is 1 % and final value is 1.5 x =[1:h:1.5]; % The code will use the exact solution to compute the exact value at % the needed points and will store it in the vector y_exact y_exact = exp(x.^2-1); % The code will call the function euler1 to compute the approximation % of the solution and will store it in the vector y_n y_n=euler1(h); % Then the relative error is computed and stored in the vector y_error y_error=abs((y_exact-y_n))./abs(y_exact) % In figure 1 we plot the error hold on figure(1); plot(x,y_error);