Numerical integration/Gauss-Legendre Quadrature: Difference between revisions

m
m (→‎version 3, more precision: updated the output which has more precision.)
Line 1,127:
Translated from the Python solution.
<lang MATLAB>
%Print the result.
disp(GLGD_int(@(x) exp(x), -3, 3, 5));
 
%Integration using Gauss-Legendre quad
%Does almost the same as 'integral' in MATLAB