自适应求积算法 MatLab版
%自适应simpson算法clcclearclose all;syms xf(x)=100/(x^2)*sin(10/x);%目标函数a=1;b=3;%初始区间TOL=1E-4;%误差容限[s,fcount]=acsimpson1(f,a,b,TOL);t = 1:0.001:3;plot(t,f(t))hold ondisp("自适应求积结果:")result = vpa(s);fprintf("result= %f",result);% 画出f(x)图像functio.
原创
2021-05-27 23:08:53 ·
3163 阅读 ·
1 评论