x[0 0.1 0.2 0.3 0.5 0.8 1.0] x=[0 0.1 0.2 0.3 0.5 0.8 1.0] y=exp(-x.^2.5) format long y=exp(-x.^2.5) plot(x,y) plot(x,y,'o') help plot plot(x,y,'-*r') x=0:10 x=0:0.1:1 y=exp(-x.^2.5) plot(x,y,'-*r') x=0:0.1:1 n=10 h=(1-0)/n x(1) x(11) help mysimp mysimp mysimp(100) mysimp(10000) mysimp(100000) mysimp(1000000) help rem mysimp(0,1,100) mysimp(0,1,101) f=inline('exp(-x^2.5)','x') f(0) mysimp(f,0,1,100) f=inline('exp(-x^(2.5))','x') mysimp(0,1,100) mysimp(f,0,1,100)