필터 지우기
필터 지우기

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 CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by