[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Function-pointer - function as argument for functions
From: |
Christian Zobel |
Subject: |
Function-pointer - function as argument for functions |
Date: |
Wed, 26 Apr 2000 17:29:48 +0200 (MEST) |
Hello,
is it possible for example to call a function which depending on the
argument calculates sin(x) or x**2.
What I want to have would look like:
function retval = fun10 ( funname() )
retval = funname(10);
endfunction
and I'd like to call it like this:
fun( sin() )
=> -0.544
or
fun( sqrt() )
=> 3,16
Christian
--
Christian Zobel *** address@hidden *** +49-221-470-2911/3604
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------