You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
181 B

2 years ago
function I = gauss1D(funct,bound1,bound2,pts)
I=0;
[x, w] = GaussLegendreQuad1D(pts,bound1,bound2);
for i=1:size(x,1)
I=I+ w(i)*funct(x(i));
end
I=I;
end