Borrar filtros
Borrar filtros

Updating workspace variables using GUIDE

2 visualizaciones (últimos 30 días)
Craig Saunders
Craig Saunders el 27 de Jul. de 2018
Comentada: Rik el 27 de Jul. de 2018
I am trying to create a GUI using 'GUIDE' and have a set of workspace variables that I would like the GUI to update. I have 25 variables that I would like the user to update once they press an update button. Ideally, they would open the GUI, enter in 25 user inputs into separate 'edit text' boxes , followed by a click of the update button and then that should update the workspace variables.
I hope you can help!
  12 comentarios
Craig Saunders
Craig Saunders el 27 de Jul. de 2018
Thanks Adam! I'll give this a try - ideally I would like to use GUIDE though as I can make the user interface customisable fairly quickly.
I understand GUIDE creates an auto-generated code which then needs to be updated with how the buttons and 'edit text' fields function. It would be great to see an example code which allows a user to enter a value into the 'Edit Text' field, hit the button, which will then trigger a change in the workspace variable. At present I have been able to enter a value within GUI.m which changes the workspace variable, however I want this value entered into the 'User Input' field of the GUI instead.
Cheers.
Rik
Rik el 27 de Jul. de 2018
I would suggest not using GUIDE in the first place (even for GUI design), but rather read the doc for uicontrol. The values you enter are stored in the String property of each edit field. The callback for the button needs to convert them to numeric values and put them in a struct output.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Productos


Versión

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by