You are on page 1of 1

integracion multiple

f=inline(get(handles.edit1,'sstring'),'x','y');
g1=inline(get(handles.edit2,'string'));
g2=inline(get(handles.edit3,'string'));
a=str2double(get(handles.edit4,'string'));
b=str2double(get(handles.edit5,'string'));
h=(b-a)/2;
x0=a;
s=0;
for i=1:3
h2=(g2(x0)-g1(x0))/2;
w(i)=(h2/3)*(f((x0),g1(x0))+4*f(x0,g1(x0)+h2)+f(x0,g2(x0)));
x0=x0+h;
end
I=(h/3)*(w(1)+4*w(2)+w(3));
set(handles.edit6,'string',I);
%para la grafika
f=get(handles.edit,'string');
f1=inline(f,'x','y');
ezmesh(f1);
grid on

You might also like