Set a global variable in a script with multiple functions

3 vues (au cours des 30 derniers jours)
Edward
Edward le 12 Juil 2014
I have a script that contains about 5 functions and they all need access to a String array.
Is there a way I can only define the string array once in the script but so all the functions can access it?

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 12 Juil 2014
You can't do it, you have to declare the variable as global in each function

Catégories

En savoir plus sur Cell Arrays dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by