%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 2-dimensionale Trapezregel % % Integrationsgebiet Rechteck im R^2 % close all clear all n=600; xmin=0;xmax=1;ymin=0;ymax=1; % Rechteckgrenzen hx=(xmax-xmin)/n; hy=(ymax-ymin)/n; xi=[xmin:hx:xmax]; yj=[ymin:hy:ymax]; [X,Y]=meshgrid(xi,yj); F=Normalxy(X,Y); Integral=sum(sum(F(2:n,2:n),1),2); % Alle inneren Punkte mit Gewicht 1 Integral=Integral+1/2*(sum(F(1,2:n),2)+sum(F(n+1,2:n),2)... +sum(F(2:n,1),1)+sum(F(2:n,n+1),1)); Integral=Integral+1/4*(F(1,1)+F(1