help-octave
[Top][All Lists]
Advanced

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

Re: Calling octave functions from oct-files


From: Muthiah Annamalai
Subject: Re: Calling octave functions from oct-files
Date: Thu, 17 Jan 2008 09:58:32 -0600

On Jan 17, 2008 7:32 AM, Carlo de Falco <address@hidden> wrote:
>
> 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.
>
>

If you pulled off the code from Octave repository, you need to keep the
GPL license headers intact.

-Muthu


reply via email to

[Prev in Thread] Current Thread [Next in Thread]