From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How do I pass a value to a function called by ode45?
Date: Fri, 8 Feb 2013 03:42:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <kf1s6f$8va$>
References: <kerh1u$72o$> <kerhrj$aeq$> <kes0dn$arn$> <kf0jia$58o$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1360294927 9194 (8 Feb 2013 03:42:07 GMT)
NNTP-Posting-Date: Fri, 8 Feb 2013 03:42:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2105620
Xref: comp.soft-sys.matlab:788581

"Steven_Lord" <> wrote in message 
> ODE45 requires the function that you pass into it as a function handle for 
> the first input to accept two input arguments.
> Your function f requires three input arguments.
> If we have a function that accepted the two input arguments from ODE45 and 
> passed them and another value into f, to serve as an adapter or go-between 
> for ODE45 and the f function, they will both be satisfied. The anonymous 
> function IS that adapter/go-between. The "@(t, y)" section of the anonymous 
> function indicates that it accepts two inputs (and so is a valid first input 
> for ODE45) and the "f(t, y, beta)" section calls f with three input 
> arguments (as it requires.)
> -- 
> Steve Lord
> To contact Technical Support use the Contact Us link on 

Ahhh. In other words, the anonymous function "@(t,y)" is a function with one line. That line is "f(t,y,beta)".
Pretty neat.
Thanks for explanation.