http://www.mathworks.com/matlabcentral/newsreader/view_thread/243323
MATLAB Central Newsreader  zintegration in spherical coordinates
Feed for thread: zintegration in spherical coordinates
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Thu, 29 Jan 2009 02:54:40 +0000
zintegration in spherical coordinates
http://www.mathworks.com/matlabcentral/newsreader/view_thread/243323#624657
KS
Hi all,<br>
<br>
I need to integrate a 2d vector in spherical coordinates (radius and<br>
colatitude) along the z direction. Does anyone have advice or a<br>
script to do this?<br>
<br>
Thanks,<br>
KS

Thu, 29 Jan 2009 10:07:51 +0000
Re: zintegration in spherical coordinates
http://www.mathworks.com/matlabcentral/newsreader/view_thread/243323#624710
vedenev
triplequad function can integrate 3 variable integrals numericly.<br>
<br>
<br>
Maxim Vedenev, Matlab freelancer<br>
vedenev@ngs.ru<br>
<a href="http://simulations.narod.ru/">http://simulations.narod.ru/</a>

Thu, 29 Jan 2009 15:24:15 +0000
Re: zintegration in spherical coordinates
http://www.mathworks.com/matlabcentral/newsreader/view_thread/243323#624783
KS
On Jan 29, 2:07=A0am, vedenev <vedenev.ma...@gmail.com> wrote:<br>
> triplequad function can integrate 3 variable integrals numericly.<br>
><br>
> <br>
> Maxim Vedenev, Matlab freelancer<br>
> vede...@ngs.ru<a href="http://simulations.narod.ru/">http://simulations.narod.ru/</a><br>
<br>
Thanks for the suggestion. It seems that triplequad is only for a<br>
function f=3D(x,y,z), (eg., f=3Dy*sin(x)+z*cos(x)). However, my data is<br>
not defined this way; I only have data at discrete points in a<br>
spherical shell. Is there a way to accommodate for this using<br>
triplequad?

Thu, 29 Jan 2009 17:30:19 +0000
Re: zintegration in spherical coordinates
http://www.mathworks.com/matlabcentral/newsreader/view_thread/243323#624808
Roger Stafford
KS <KSoderlund@gmail.com> wrote in message <9f121c6c68ea49ada8aaeab0025e3413@k36g2000pri.googlegroups.com>...<br>
> ......<br>
> Thanks for the suggestion. It seems that triplequad is only for a<br>
> function f=3D(x,y,z), (eg., f=3Dy*sin(x)+z*cos(x)). However, my data is<br>
> not defined this way; I only have data at discrete points in a<br>
> spherical shell. Is there a way to accommodate for this using<br>
> triplequad?<br>
<br>
You need to state more clearly what you are trying to do, KS. What is it you are integrating as z changes? It sounds as if for each z you have a circle intersection with the sphere on which many discrete points have values but it isn't clear how you wish these values to be included in an integration process in the z direction. If you have discrete values distributed over the spherical surface it takes a double integration of some kind to get a single answer, but that would involve integrating in more than just the zdirection; double integrals require integrations taken with respect to two variables.<br>
<br>
Please think things out carefully and then give a much more complete description of your problem. People in this newsgroup generally dislike having to continually make guesses as to what users really want. That can cause a lot of wasted effort.<br>
<br>
You should also realize that if you are dealing with discrete values, you will ordinarily not be able to use such functions as 'quad', 'dblquad', or 'triplequad' which require a continuous function be defined. Instead you will have to make use of routines which deal with discrete values such as 'trapz' or some of the higher order integration routines in the Matlab File Exchange.<br>
<br>
Roger Stafford