|
KS <KSoderlund@gmail.com> wrote in message <9f121c6c-68ea-49ad-a8aa-eab0025e3413@k36g2000pri.googlegroups.com>...
> ......
> Thanks for the suggestion. It seems that triplequad is only for a
> function f=3D(x,y,z), (eg., f=3Dy*sin(x)+z*cos(x)). However, my data is
> not defined this way; I only have data at discrete points in a
> spherical shell. Is there a way to accommodate for this using
> triplequad?
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 z-direction; double integrals require integrations taken with respect to two variables.
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.
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.
Roger Stafford
|