How to get user input from edit field (numeric)
7 次查看(过去 30 天)
显示 更早的评论
I'm trying to get the values from an edit field in order to do some manipulation.
x1 = get(app.EditField1, 'String');
x2 = get(app.EditField2, 'String');
y1 = str2double(x1)*Fs;
y2 = str2double(x2)*Fs;
However, for some reason I get the following error.
Error using matlab.ui.control.NumericEditField/get
Unrecognized property String for class NumericEditField.
I'm not sure why this is, I've tried various different ways from various posts on here but I'm having no luck. Any help would be appreciated.
EDIT: I've also tried returning types such as 'int' and 'string'. Additionally I've tried:
app.EditField1.Value
2 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!