Upload
nm5793
View
217
Download
0
Embed Size (px)
Citation preview
7/22/2019 euler.txt
1/1
PROGRAM ON EULER'S METHOD:
clc;x0=input('Enter the value of x0:');y0=input('Enter the value of y0:');xg=input('Enter the value of xg:');h=input('Enter the value of h:');
n=(xg-x0)/h;
for i=1:nx1=x0+h;y1=y0+h*(x0-y0*y0);x0=x1;y0=y1;
end
fprintf('\n Yg=%f',y1);
OUTPUT:
Enter the value of x0:0Enter the value of y0:1
Enter the value of xg:4Enter the value of h:1
Yg=1.000000