Re: Making variables available to several *.m files
- From: Dan Hensley <somewhere@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 08 Apr 2007 13:58:59 -0500
On Sun, 08 Apr 2007 08:24:48 -0400, Richard L. Bennett wrote:
I am developing a matlab program for helicopter aeroelasticity. It will
contain several *.m files. Is there an easy way to make most of the
variable available to other *.m files other than having a very long
"Global" that has to be manually changed in all the *.m files every time
a new variable is added to the list.
Put them in a structure that you pass around between the functions. Or
have a function declare the structure or variables as persistent in the
function, then recall them in your functions by having it pass the
persistent variables out. Of course if you do it that way you will need
to store the structure again in your persistent function at the end of
each function where you modify the contents.
Dan
.
- References:
- Making variables available to several *.m files
- From: Richard L. Bennett
- Making variables available to several *.m files
- Prev by Date: Re: Making variables available to several *.m files
- Next by Date: Re: Coupled Set of Second Order Equations (ode45?)
- Previous by thread: Re: Making variables available to several *.m files
- Next by thread: Re: Making variables available to several *.m files
- Index(es):
Relevant Pages
|