Get value from field
显示 更早的评论
I want to create an entryfield and read the numeric value in it. Icreated the field but cant get the number from it.
4 个评论
Cris LaPierre
2024-1-6
编辑:Matt J
2024-1-6
Value is a property of the edit field. Access it using dot notation. You can see examples here: https://www.mathworks.com/help/matlab/ref/uieditfield.html
There are a couple ways of creating edit fields. What does your code look like?
Mohammad Mohammad
2024-1-6
Rik
2024-1-6
There doesn't seem to be anything wrong with this code, other than that you have no time to put in a value before it is retrieved.
Mohammad Mohammad
2024-1-6
回答(1 个)
Walter Roberson
2024-1-6
0 个投票
You would get that error if fig is a figure() instead of being a uifigure()
类别
在 帮助中心 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!