Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

x=0:1:10;

y=[1,0.5,0.2,0.1,0.059,0.038,0.027,0.02,0.0154,0.0122,0.0099];
h=x(2)-x(1);
n=length(x);

%Simp 3/8

disp('simpons 3/8')

se3=0;
se2=0;

for i=2:3:n-1
se3= se3 + 3*(y(i)+y(i+1));
end

for i=4:3:n-3
se2 = se2 + 2*y(i);
end

Ise=3*h/8*(y(1)+se3+se2+y(n))

simpons 3/8

Ist =

1.4104

Published with MATLAB® R2018b

You might also like