Gauss-Legendre

by

 

02 Mar 2004 (Updated )

Numericaly evaluates integral using Gauss-Legendre quadrature method.

y=flege(f,a,b)
function y=flege(f,a,b)

%Performs variable change if a=!-1 y b=!1
syms x;
x=((b-a)./2).*x+(b+a)./2;
dx=(b-a)./2;
y=feval(f,x)*dx;

Contact us