integrais matlab code example Example: integral in matlab fun = @(x) exp(-x.^2).*log(x).^2; q = integral(fun,xmin,xmax)