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 个评论

Are you using GUIDE to create the GUI or just doing it programmatically?
I am using GUIDE
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