Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all, close all, clc
- N=6; Li=3.0; Ls=3.6; h=(Ls-Li)/N;
- x=Li:h:Ls; y=1./x;I=0;
- disp('DIVISAO DE SUBINTERVALOS')
- for i=1:N
- A=[i,i+1]; disp(num2str(A));
- I=I+(h/2)*(y(i)+y(i+1));
- end
- disp(' '); disp(['A integral vale:' num2str(I)]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement