help-octave
[Top][All Lists]
Advanced

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

Re: passing parameters to a funcion with lsode


From: Geordie McBain
Subject: Re: passing parameters to a funcion with lsode
Date: Mon, 18 Oct 2004 18:29:38 -0400

This can be done quite easily with global variables.  Declare the
parameters global at the top level and inside the function.  Set them at
the top level before the function is called.  Then your function can be
unary, as required by lsode.

See 'Variables/Global variables' in the manual for further details.

On Mon, 2004-10-18 at 04:17, roger baig viñas wrote:
> I would like to know if it is possible to pass parameters to the 
> function that is called from lsode, and if it is, how can i do it.
> 
> I should use lsode like follows:
> 
> Xd=lsode("dxdt_tancDoble_mf",x_0,t)
> 
> with dxdt_tancDoble_mf function that has a header like:
> 
> function dxdt=dxdt_tancDoble_mf(t,x,u,param)
> 
> 
> Thank you very much
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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