Debugging the code which is written with global function

1 vue (au cours des 30 derniers jours)
Bathrinath
Bathrinath le 8 Mai 2014
I am trying to modify the code in which code is written by declaring global, and all functions are in the same page. If I am trying to debug, in the workspace it is not showing the data. After debugging it is showing 'unassigned'.How to debug this.I have to modify some data. Give some points

Réponses (1)

Juderb
Juderb le 8 Mai 2014
Your question is vague. Within your code, what is declared global? Is the variable declared global in ALL functions you wish to use it in, using the same exact name?
Also, the global variable persists only as long as it is a live-variable in at least one function. If you declare a variable global in a function, and that function ends, the variable will be de-allocated. Attempting to declare the same variable global in another function will result in creating an empty "double" value.

Catégories

En savoir plus sur Data Types 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