Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a=0;
- b=10;
- h=1;
- n=(b-a)/h;
- pole=0;
- for i=1:h:n
- xa=(i-1)*h;
- xb=(i)*h
- pole=pole+0.5*(xb-xa)*(xa^2+xb^2);
- end;
- pole
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement