Re: Making variables available to several *.m files



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
.



Relevant Pages

  • Botulism-recall foods still on sale - One contaminated item found in Oakland grocery store
    ... One contaminated item found in Oakland grocery store ... The recall now covers two years' production at the company's Augusta, ... Spot checks by the Food and Drug Administration and state officials ... whether botulism confirmed in a San Diego County woman was linked to ...
    (soc.culture.china)
  • Re: Another Pet Food Alert
    ... >>of her cats are sick from eating the recalled cat food. ... >>This was not just an isolated incident in one Wal-Mart store. ... >>underneath the sticker matches the ones on the pet food recall list. ... > the original UPC code (that indicates it's from the tainted ...
    (rec.pets.cats.anecdotes)
  • Re: Another Pet Food Alert
    ... of her cats are sick from eating the recalled cat food. ... more recalled cat food on shelves in another Wal-Mart store. ... underneath the sticker matches the ones on the pet food recall list. ...
    (rec.pets.cats.anecdotes)
  • Re: Hashed password secure?
    ... > strongly suggest that you don't modify the standard crypt source on ... which obviously should be much more secure than Win98/NT ... that only opens up when a user logs on to ... store should be as safe as possible, and as resistent to brute force as ...
    (sci.crypt)
  • Re: For the fun of it
    ... It looks like they were bought up by Compusmart. ... store there seemed to be in good shape. ... though I can't recall exactly when. ...
    (comp.sys.apple2)