comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help with numerical integration
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Help with numerical integration [message #51721 is a reply to message #51720] Tue, 05 December 2006 01:28 Go to previous messageGo to previous message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
On 4 Dec 2006 14:31:47 -0800, "Dave" <Confused.Scientist@gmail.com>
wrote:

> Hi all,
>
> I have never been particularly fond of numerical integration and
> generally do it pretty infrequently these days. Nevertheless, I am
> trying to do a 'quick-and-dirty' atmospheric refraction/ray-trace
> calculation and I'm stumped on the integration. The integral reads:
>
> s = \int_{r1}^{r2} ( n(r) * r * dr ) / sqrt( n(r)^2 - c^2 )
>
> where c is a constant. The trouble I'm having is that n is a function
> of r. Thus, I have a set of discrete points for r:

I'm not sure why "n is a function of r" would be a problem for
numerical integration. As long as you can evaluate it, as you clearly
can, there is no problem. Or am I missing something?

You can for example use IDL's INT_TABULATED where
X=r and F = ( n(r) * r) / sqrt( n(r)^2 * r^2 - c^2 )
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: New Eclipse-based IDE
Next Topic: Logarithmic Color Scaling

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:20:39 PDT 2025

Total time taken to generate the page: 0.09774 seconds