Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Calculate complicated integral many time

2 views (last 30 days)
KOZI
KOZI on 1 Nov 2018
Closed: MATLAB Answer Bot on 20 Aug 2021
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

Answers (0)

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!