help-octave
[Top][All Lists]
Advanced

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

Re: How to allow for a parameter when callling another function


From: clustro
Subject: Re: How to allow for a parameter when callling another function
Date: Fri, 6 May 2011 19:07:55 -0700 (PDT)

Hi there,

It ends up I think I was making a minor typo somewhere. The idea I had
before *is* correct. Sorry! ;(

So, for the sake of posterity/making the knowledge available to others, if
you want to be able to insert parameters into functions that call other
functions (e.g. ode45, fzero, or mcsa - monte carlo simulated annealing),
you just need to use that funny @(x) notation:

y = yourfunction( @(x) targetfunction(x,params), remaininginputs)

--
View this message in context: 
http://octave.1599824.n4.nabble.com/How-to-allow-for-a-parameter-when-callling-another-function-tp3494091p3504787.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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