[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Passing functions as parameters
From: |
Dejan Beznec |
Subject: |
Passing functions as parameters |
Date: |
Wed, 19 Apr 2000 20:52:24 +0200 |
Hello!
I was wondering whether it is possible to pass a valid octave function
(e.g. sin(x)+log(x^2+x)) as a parameter to another user-defined
function.
For example:
How to pass f(x)=sin(x)+log(x^2+x) as a parameter to:
function myfunction(f)
... (perform some calculations with f(x))
endfuction
Making a separate m file for each function to be passed is not
acceptable.
I am not interested in this particular case, but how to pass a function
in general.
Kind regards
Dejan
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------
- Passing functions as parameters,
Dejan Beznec <=