使用dblquad函​数计算二重积分一直报​错,情况如下。

10 visualizaciones (últimos 30 días)
皇家国际登录网址【微8785092】
用这段程序进行数值积分一直出现下面这样的报错。该怎么解决啊
这是程序
f1=@(x,y)((y-DY1)/((x-DX1)^2+(y-DY1)^2)^0.5)*0.9*(3*x+2*y)
f1 =
包含以下值的 function_handle:
@(x,y)((y-DY1)/((x-DX1)^2+(y-DY1)^2)^0.5)*0.9*(3*x+2*y)
>> DY1==2,DX1==3,BX==1,L==3
ans =
DY1 == 2
ans =
DX1 == 3
ans =
BX == 1
ans =
L == 3
>>FX1=dblquad(f1,-BX/2,BX/2,-L/2,L/2,1.0e-3)
错误使用 dblquad>innerintegral (第 76 行)
输入必须为单精度或双精度浮点值。
出错 quad (第 67 行)
y = f(x, varargin{:});
出错 dblquad (第 55 行)
Q = quadf(@innerintegral, ymin, ymax, tol,trace, intfcn, ...

Respuesta aceptada

皇家国际开户网址【微8785092】
仅供参考
DY1=2;DX1=3;BX=1;L=3;
f1=@(x,y)((y-DY1)./((x-DX1).^2+(y-DY1).^2).^0.5)*0.9.*(3*x+2*y);
X1=dblquad(f1,-BX/2,BX/2,-L/2,L/2,1.0e-3)

Más respuestas (0)

Categorías

Más información sobre MATLAB 快速入门 en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!