www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ImproperIntegralofOscillatoryFunctionExample.m
%% Improper Integral of Oscillatory Function %% % Create the function $f(x) = x^{5} e^{-x} \sin x$. fun = @(x)x.^5.*exp(-x).*sin(x); %% % Evaluate the integral from |x=0| to |x=Inf| , adjusting the absolute and % relative tolerances. format long q = integral(fun,0,Inf,'RelTol',1e-8,'AbsTol',1e-13)