How to use the handle of APP Designer in MATLAB Function?
17 次查看(过去 30 天)
显示 更早的评论
Hi!
I have a GUI designed in the APP Designer named App1, in the Model callbacks I set InitFcn as
happ = App1;
I want to change something in the App1 such as
happ.EditField.Value = u;
u is the input of the Matlab Fuction in my Simulink model. The changing is failed, happ can not use in the MATLAB Fuction. I am trying to set happ as parameter. It not work.
Who can slove the question? I really appreciate it.
0 个评论
回答(1 个)
Adam Danz
2020-6-9
'u' should be a character vector or string scalar.
If you're trying to input a numeric value, it must first be converted to a string using num2str() or sprintf() or compose() (and others).
If the error persists, please share the entire error message, the value of u, and please confirm that EditField is a text edit field.
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!