How to bring data from variables(workspace tab) into gui?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jonathan O'Neill
el 13 de Ag. de 2014
Comentada: Geoff Hayes
el 2 de Feb. de 2017
Hello, sorry if this question seems odd or simple to some but I only used Matlab for one semester at university and I am completely new to Guide... I have been watching tutorials on it but I seem to have scrambled my head.
Basically I have created a list of functions to record information from a piece of equipment connected to the computer, it reports these values and starts a camera to run pre defined tasks.
What I need to do is create a gui to make the testing process easier and I want to have the information from the camera displayed on the main gui screen. ie: cam no, cam serial, no of cameras...etc How can I pull the information collected from variables in the workspace tab and list them on the gui?
3 comentarios
Geoff Hayes
el 2 de Feb. de 2017
swetha suresh's answer moved here
wll you pls send the coding for this question it wll be helps to my project
Respuesta aceptada
Iain
el 13 de Ag. de 2014
Editada: Iain
el 13 de Ag. de 2014
I can think of four ways to skin this cat:
1. Declare the variables as global in all workspaces you want access to them. (I'd recommend against this one)
2. Use your GUI's code to generate the variables, rather than putting them into the workspace and pass the data around the GUI using the "userdata" properties of all the controls (which is what I'd recommend)
3. Use "evalin" to get variables out of the base workspace (this method is nasty & horrible)
4. Don't store the variables in the base workspace. Save it to a file, then reload the file in the gui code whenever you need to.
Guide will generally create two functions that get called for each button etc you add. One which takes effect when the button/control gets generated and one which takes effect when it gets clicked. Put your code to interrrogate the camera settings in one of the object creation functions.
Más respuestas (0)
Ver también
Categorías
Más información sobre Migrate GUIDE Apps 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!