Re: Functions defined by integrales in IDL [message #5361] |
Mon, 04 December 1995 00:00 |
wclodius
Messages: 3 Registered: November 1995
|
Junior Member |
|
|
Miska:
A quick and dirty solution is to create a function that uses a common
block to define a, and integrate over the function, e.g.,
FUNCTION h, x
COMMON PASSA, a
RETURN, g(a,x)
END
The routine that calls the integrating routines must set a. There may be
other solutions.
--
William B. Clodius Phone (505) 665-9370
Los Alamos Natl. Lab. NIS-1 FAX (505) 665-7395
PO Box 1663, MS-D466 Group Office (505) 667-2701
|
|
|
Re: Functions defined by integrales in IDL [message #5362 is a reply to message #5361] |
Mon, 04 December 1995 00:00  |
safier
Messages: 12 Registered: March 1995
|
Junior Member |
|
|
>>>> > "Miska" == Miska Le Louarn <lelouarn@eso.org> writes:
Miska> I have the following problem to solve with IDL: f(a) is a
Miska> function defined by an integral: f(a)=integrate[g(a,x)dx]
Miska> where the integration is made over a finite range.
Miska> I would like to get a numerical evaluation of f, knowing a.
Miska> The problem is that I can't pass "a" to any of the standard
Miska> IDL integration procedures (they all require the name of a
Miska> function with only *one* parameter: here x). The 2 D
Miska> algorithms don't work either, since I am doing only one
Miska> integration.
Miska> So is there a standard solution to solve this problem or do
Miska> I have to write an integration routine accepting two inputs
Miska> ?
Miska> Thanks in advance,
Miska> Miska Le Louarn
Miska> lelouarn@eso.org
Use common blocks in the definition of the function to be integrated.
Cheers,
Pedro
--
Pedro N. Safier |
Department of Astronomy | "Tzedek, Tzedek Tirdof"
U. of Maryland at College Park |
phone: 301-405-1531; fax: 301-314-9067 |
|
|
|