[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing function to function called by qromb etc.?



I would like to numerically integrate f(x) * x in IDL.  This is coming
up within another function which takes the function f as one of its
parameters.  What I would like to do is define a function xfx which
computes f(x) * x for a given x and call qromb with the function
xfx with a parameter of the function f.  However, I cannot figure out
how to do this.

I thought of 
function xfx,x,func=f
return, call_function(func,x) * x
end

foo=qromb(xfx,a,b,func='bar')

but that does not work.  What I really need is a capability like the
bind argument facility of the STL.

Thanks,
John Wilson

-- 
John Wilson	                      Department of Computer Science
email: jwilson@cs.colorado.edu        University of Colorado at Boulder
office phone: (303) 492-4740          Campus Box 430
office: CAPP Lab ECCS 112 (112c)      Boulder, CO 80309-0430