三重积分对球面积分,报“已达到函数计算的最大数目”。
Show older comments
代码如下,为对球面的三重积分
clear all;clc;
x= -1:10^(-3):1;y= -1:10^(-3):1;z= -1:10^(-3):1; %积分范围,一个球
f=@(x,y,z) 1./((x.^4+y.^4+2*x.^2.*y.^2+x.^2.*z.^2+y.^2.*z.^2).^(0.5));%被积分的函数
xmin = -1; %以下为积分过程
xmax = 1;
ymin = @(x)-sqrt(1 - x.^2);
ymax = @(x) sqrt(1 - x.^2);
zmin = @(x,y)-sqrt(1 - x.^2 - y.^2);
zmax = @(x,y) sqrt(1 - x.^2 - y.^2);
q=integral3(f,xmin,xmax,ymin,ymax,zmin,zmax,'Method','tiled')
报错信息:
警告: 已达到函数计算的最大数目(10000)。这个结果将使全局误差测试失败。
> In integral2Calc>integral2t (line 129)
In integral2Calc (line 9)
In integral3/innerintegral (line 146)
In integralCalc/iterateScalarValued (line 314)
In integralCalc/vadapt (line 132)
In integralCalc (line 75)
In integral3 (line 121)
In gaicuo4_6 (line 12)
警告: 积分未成功。
> In integral3 (line 125)
In gaicuo4_6 (line 12)
我的理解是,可能是积分区域包括了零点,导致函数有了无穷大点,请教诸位有没有什么解决方案或者对这个错误的其他见解,跪谢
Accepted Answer
More Answers (0)
Categories
Find more on 特殊函数 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!