Get Values from a push button

Hey, This is my first time working with GUIs in MATLAB and essentially what I am trying to do is have a push button that when pressed generates two random numbers and places each number in its own specific text box. I believe I have it where the push button runs code to generate random numbers I am just unsure of how to get these numbers and place them in their respective text boxes. Thanks!

댓글 수: 3

Adam
Adam 2016년 9월 6일
Are you using GUIDE to create the GUI or just doing it programmatically?
Swil
Swil 2016년 9월 6일
I am using GUIDE
Adam
Adam 2016년 9월 6일
Then you just need to get hold of your text boxes by their tags in the pushbutton callback and set their 'String' property. There are numerous examples in the Help of accessing ui controls from within a callback.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

질문:

2016년 9월 6일

댓글:

2016년 9월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by