www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ImproperIntegralExample.m
%% Improper Integral %% % Create the function $f(x) = e^{-x^{2}}(\ln x)^{2}$. fun = @(x) exp(-x.^2).*log(x).^2; %% % Evaluate the integral from |x=0| to |x=Inf|. q = integral(fun,0,Inf)