Matlab 求积分后出现警告Warning:Explicit integral could not be found

学习 时间:2026-04-07 22:26:29 阅读:3964
Matlab 求积分后出现警告Warning:Explicit integral could not be foundr=1;syms Theta_2 a Phi_2 Phif1=sin(Theta_2)*sin(Theta_2)*cos(Phi_2);f2=sqrt(r^2+a^2-2*r*a*sin(Theta_2)*cos(Phi-Phi_2));f3=f1/f2;f4=int(f3,Theta_2,0,pi);f5=int(f4,Phi_2,0,pi);本人刚入手matlab,运算上述积分,在对f5积分时,出现Warning:Explicit integral could not be found,

最佳回答

可爱的毛衣

沉静的冥王星

2026-04-07 22:26:29

Warning:Explicit integral could not be found这是提示你matlab求不出上述积分的符号解。此时,你可求数值积分。% 以下代码在7。1版以上均可运行。r=1;a=2; % 输入a的值Phi=3; % 输入Phi的值f1 = @(Theta_2,Phi_2) sin(Theta_2)。*sin(Theta_2)。*cos(Phi_2);f2 = @(Theta_2,Phi_2) sqrt(r^2+a^2-2*r*a。*sin(Theta_2)。*cos(Phi-Phi_2));f3 = @(Theta_2,Phi_2) f1(Theta_2,Phi_2)。/f2(Theta_2,Phi_2);f5 = dblquad(f3,0,pi,0,pi) 再问: 我之前的想法是积分后求不同r和Phi时的函数值,采用数值积分后能求出值,但是我想对f5与r和Phi作图时,是不是就只能连续去不同的r值或Phi值呢? 还有我想知道假设我这样设置参数r=linspace(1,5,100);Phi=(0,pi,100),后面的f1,f2,f3,f5该如何改动之后就能求出其值呢? 谢谢 再答: http://hi。baidu。com/zzz700/blog/item/a5d6f77ae99fbf1628388ab1。html

最新回答共有2条回答

  • 漂亮的朋友
    回复
    2026-04-07 22:26:29

    Warning:Explicit integral could not be found这是提示你matlab求不出上述积分的符号解。此时,你可求数值积分。% 以下代码在7。1版以上均可运行。r=1;a=2; % 输入a的值Phi=3; % 输入Phi的值f1 = @(Theta_2,Phi_2) sin(Theta_2)。*sin(Theta_2)。*cos(Phi_2);f2 = @(Theta_2,Phi_2) sqrt(r^2+a^2-2*r*a。*sin(Theta_2)。*cos(Phi-Phi_2));f3 = @(Theta_2,Phi_2) f1(Theta_2,Phi_2)。/f2(Theta_2,Phi_2);f5 = dblquad(f3,0,pi,0,pi) 再问: 我之前的想法是积分后求不同r和Phi时的函数值,采用数值积分后能求出值,但是我想对f5与r和Phi作图时,是不是就只能连续去不同的r值或Phi值呢? 还有我想知道假设我这样设置参数r=linspace(1,5,100);Phi=(0,pi,100),后面的f1,f2,f3,f5该如何改动之后就能求出其值呢? 谢谢 再答: http://hi。baidu。com/zzz700/blog/item/a5d6f77ae99fbf1628388ab1。html

上一篇 (1/2)The little boy( )his seat to the old lady on the crowde

下一篇 PC材料料性