Info

此问题已关闭。 请重新打开它进行编辑或回答。

Calculate complicated integral many time

2 次查看(过去 30 天)
KOZI
KOZI 2018-11-1
关闭: MATLAB Answer Bot 2021-8-20
Hello every body. I am trying to integrade a complicated function but with command int, it takes for ever.My code is:
syms x z th1;
y=0;
r=(x^2 + y^2 + z^2)^0.5;
th=acos(z/r);
fh=atan(y/x);
d=2;
a=1;
d1=(a^2)/d;
L=1.5;
R1=(r^2 + d^2 - 2*r*d*(cos(th)*cos(th1) + sin(th)*sin(th1)))^0.5;
R2=(r^2 + d1^2 - 2*r*d1*(cos(th)*cos(th1) + sin(th)*sin(th1)))^0.5;
F1=d/R1;
F2=-(a/R2);
f=F1+F2;
int(f,th1,-L/d,L/d)
I want to compute it and then take the gradient of that.But as long as i wait it does nothing. I dont know anything about matlab, i just need the result.It is very important to calculate it because without it i cant do nothing. I have also have to use surface function,contour function in the above result. Thanks in advance

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by