Using workspace variables inside GUIDE
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Rodrigo Orderique
il 16 Lug 2017
Commentato: Image Analyst
il 16 Lug 2017
Hello everyone.
New to MATLAB here. I'm creating a GUIDE that, by the click of a pushbutton, will generate a plot. That plot is generated via a function that uses variables located in the workspace. I'm not sure as to how I can bring the data from those variables into the GUI as well as to pass that information to the function.
Any help would be appreciated,
Thanks!
0 Commenti
Risposta accettata
Image Analyst
il 16 Lug 2017
I don't like that way of operating, but if you insist, use evalin():
This example extracts the value of the variable var in the MATLAB base workspace and captures the value in the local variable v:
v = evalin('base', 'var');
2 Commenti
Image Analyst
il 16 Lug 2017
I have all my code in one program. I find it's easier to have everything done on one GUI that takes up the whole screen rather than having to run multiple programs and have multiple GUI windows up, or having to interact sometimes in the command window, and then getting all the various programs to communicate with each other. If the programs are so large and different from each other, then I'd just have one save it's final output in a .mat file and have the other program load that .mat file.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Variables in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!