[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calling octave functions from oct-files
From: |
Carlo de Falco |
Subject: |
Re: Calling octave functions from oct-files |
Date: |
Thu, 17 Jan 2008 13:32:23 +0000 |
On 17/gen/08, at 12:06, Carlo de Falco wrote:
Hi,
I am not really sure wether this is of any help,
but you could have a look at the source code of the
ODE/DAE solver functions which all can take function
handles as an input, and then have to evaluate them repeatedly.
for example I see (in src/DLD-FUNCTIONS/daspk.cc) things like
daspk_fcn = c(0).function_value ();
that might be related to what you want to do.
c.
Evan,
actually it seems to me that the attached code does what you intend
to do.
>> f=@(x) (x+pi)
f =
@(x) (x + pi)
>> handletest(f,ones(3,1),3)
ans =
10.425
10.425
10.425
I would be interested in knowing whether it gives any performance
improvement
when applied to your case (I suspect not).
c.
handletest.cc
Description: Binary data
- Calling octave functions from oct-files, Evan, 2008/01/13
- Calling octave functions from oct-files, John W. Eaton, 2008/01/13
- Message not available
- Re: Calling octave functions from oct-files, Evan, 2008/01/17
- Re: Calling octave functions from oct-files, Carlo de Falco, 2008/01/17
- Re: Calling octave functions from oct-files,
Carlo de Falco <=
- Re: Calling octave functions from oct-files, Evan, 2008/01/17
- Re: Calling octave functions from oct-files, Muthiah Annamalai, 2008/01/17
- Re: Calling octave functions from oct-files, Carlo de Falco, 2008/01/18
- Re: Calling octave functions from oct-files, Evan, 2008/01/19
- Re: Calling octave functions from oct-files, kensmith, 2008/01/27