Declaring a global variable

1 vue (au cours des 30 derniers jours)
karthikeyan T
karthikeyan T le 10 Fév 2012
hello guys i need to declare and define a global variable X1 to 0 in a gui callback and i need to use this variable and its value 0 in another callback function.how do i do this.pls help

Réponses (1)

William
William le 10 Fév 2012
global X1 = 0 % use all caps for global
I would advise against using global variables as they can be difficult to debug sometimes. Just my 2 cents

Catégories

En savoir plus sur Graphics Objects dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by