Load a variable in workspace from a Function
Mostra commenti meno recenti
How to load a variable (defined in a sub-function) into the workspace?
Risposta accettata
Più risposte (1)
Paulo Silva
il 5 Giu 2011
assignin('base', 'VarNameYouWishAtWorkspace', VarNameAtYourFunction)
2 Commenti
Chetan
il 6 Giu 2011
Paulo Silva
il 6 Giu 2011
We can find all kinds of weird functions inside MATLAB, I used it the first time inside a GUI, there's also the evalin function that you can use for similar purposes, it can even execute code on the workspace (good to define global variables on the workspace).
Global can be applied to any kind of variable but most people will tell you not to use global variables.
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!