How to export data from a GUI to Matlab Workspace?
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi all, I have to export data from a GUI to Matlab workspace. Anyone can help me? Thanks.
0 comentarios
Respuestas (4)
Image Analyst
el 6 de Sept. de 2012
You probably don't need to, or shouldn't need to, but if you insist, you can use the assignin() function. See the help for examples.
0 comentarios
Azzi Abdelmalek
el 6 de Sept. de 2012
you can insert in each function concerned with x y z data the below code
global x y z
you also must run it before, on Matlab Command
0 comentarios
Matt Fig
el 6 de Sept. de 2012
In the code of the GUI, when you want to export the variables do:
save guioutput
This will save all of the variables in the local workspace to a file named guioutput.mat.
Then from the command line do:
X = load('guioutput');
Now X is a structure with fieldnames the same as the variable names you saved.
If you need to do something more specific, then ask a more specific question...
2 comentarios
Matt Fig
el 6 de Sept. de 2012
You can specify where to save the variables and the name of the file. Read this:
doc save
for example:
save('C:\Users\matt fig\Documents\MATLAB3\mvars')
saves all the variables in the local workspace to myvars.mat in the MATLAB3 folder.
Ver también
Categorías
Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!