フィルターのクリア

Updating workspace variables using GUIDE

2 ビュー (過去 30 日間)
Craig Saunders
Craig Saunders 2018 年 7 月 27 日
コメント済み: Rik 2018 年 7 月 27 日
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 件のコメント
Craig Saunders
Craig Saunders 2018 年 7 月 27 日
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 2018 年 7 月 27 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by