You are on page 1of 1

clear

clc
estremi=input('give the integration intervall');
a=estremi(1);
b=estremi(2);
N=input('give grind points number');
h=1/N; %(b-a)/N
h=norm(h);
x=linspace(a,b,N); %x=linspace(a+h*.25,b-h*.25,N
f=funzioneint(x);
I=h*sum(f);
disp('I='),disp (I)

You might also like