Integral2错误消息

18视图(30天)
凯莉查韦斯
凯莉查韦斯 2021年2月10日
评论道: 沃尔特·罗伯森 2022年11月26日
我有一些困难在验证我的答案为累次积分。我希望解决
> > F = @ (x, y) x / y + y / x
F =
function_handle和值:
@ (x, y) x / y + y / x
> > q = integral2 (F, 1、2、1, 4)
运行后,我有以下错误消息:
错误使用integral2Calc > integral2t /张量(线
241)
被积函数输入输出尺寸不匹配
大小。
错误在integral2Calc > integral2t(55行)
[Qsub, esub] =张量(thetaL、thetaR phiB, phiT);
错误在integral2Calc(第9行)
[q, errbnd] =
ymin integral2t(乐趣、xmin xmax, ymax, optionstruct);
错误在integral2(第106行)
Q =
integral2Calc(乐趣、xmin xmax、yminfun ymaxfun, opstruct);
> >
是否有办法解决这个问题吗?我计算实际应约7.27805。

接受的答案

madhan拉维
madhan拉维 2021年2月10日
F = @ x (x, y)。x / y + y /
F =function_handle与价值:
@ (x, y) x / y + y / x
q = integral2 (F, 1、2、1, 4)
q = 7.2780

更多的答案(2)

环球Shil
环球Shil 2022年2月4日
清晰;
关闭;
clc;
r = 1;
E = @ (x) 150 *π* sin (x) / r;
Pds = @ (x, y) (E ^ 2) * (r ^ 2) * sin (x) / 120 *π;
Wr = integral2 (@ (x, y) Pds (x, y), 0,π,0,2 * pi);
流(' \ nPower辐射= %弗兰克-威廉姆斯\ n \ n ',或者说是);
我得到这个消息。
错误在integral2Calc(第9行)
[q, errbnd] = integral2t(乐趣、xmin xmax、ymin ymax, optionstruct);
错误在integral2(第105行)
Q = integral2Calc(乐趣、xmin xmax、yminfun ymaxfun, opstruct);
错误无题(第9行)
Wr = integral2 (@ (x, y) Pds (x, y), 0,π,0,2 * pi);
2的评论
沃尔特·罗伯森
沃尔特·罗伯森 2022年11月26日
Pds = @ (x, y) (E ^ 2) * (r ^ 2) * sin (x) / 120 *π;
可能需要
Pds = @ (x, y) (E (x) ^ 2)。* (r ^ 2)。* sin (x) / 120。*π;
虽然我不知道它的目的是成为除以(120 *π)相比,除以120多个结果,π吗?

登录置评。


卡洛斯·格雷罗州加西亚
信谊x y;
int (int (x / y + y / x, 1, 2), 1、4)
ans =
vpa (ans)
ans =
7.2780453958794257488809372753109

类别

找到更多的在数学帮助中心文件交换

s manbetx 845


释放

R2020b

社区寻宝

找到宝藏在MATLAB中央,发现社区如何帮助你!

开始狩猎!