Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Calling Global Variable in Function
Replies: 5   Last Post: Oct 29, 2009 6:47 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
mike zander

Posts: 3,542
Registered: 11/29/05
Re: Calling Global Variable in Function
Posted: Oct 29, 2009 6:25 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Steffen " <sap37@njit.edu> wrote in message <hcd378$aor$1@fred.mathworks.com>...
> Well I did define it as a Global variable before I referenced it. It still returns that same error.

NO! You must declare it as a global variable in every function where you need to use it. In the function you posted, you did NOT declare frames as global before you referenced it.

P.S., this is CLEARLY stated in the help. Type: help global

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.