MATLAB not saving variables to workspace
46 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Elvin
le 7 Jan 2014
Déplacé(e) : Walter Roberson
le 12 Août 2024
I don't know what's wrong with my MATLAB. Every time I run the dummy.m using the F5 in the editor, all the variables are being displayed in the workspace. But when I run the NitrogenDef.m using again the F5 in the editor, all the variables used in the NitrogenDef.m are not displayed in the workspace. Any help with this? Thanks!
1 commentaire
abdelkader omr
le 12 Août 2024
Déplacé(e) : Walter Roberson
le 12 Août 2024
I saved figure as follow,but I can't find it in my workspace
Réponse acceptée
Ryan Johnson
le 7 Jan 2014
That's because NitrogenDef is a function, so any variables created within it are only scoped for the life of the function (unless made global).
Comment out the first line function NitrogenDef() and it will run as a script.
7 commentaires
Plus de réponses (1)
Azzi Abdelmalek
le 7 Jan 2014
They are different type of file : script file and function file
0 commentaires
Voir également
Catégories
En savoir plus sur Search Path 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!