GUI design problem: push button control a switch

10 次查看(过去 30 天)
Hi, everyone, I try to build a push button to control a switch in simulink model, however, I got this error :
??? Error using ==> @(hObject,eventdata)exe1('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) 'pushbutton1_Callback' is an invalid option
??? Error while evaluating uicontrol Callback
in the M. file, I simply use set_param('name_/name','sw','0')
please help me . Thank you.
Jingbo
  2 个评论
Ryan G
Ryan G 2012-10-15
The error is with the pushbutton not the set_param command. You can see it cannot reference the pushbutton callback. This can happen for a number of reasons, one may be you changed the tag in GUIDE, changed the m-file and then saved GUIDE later and the m-file does not match the tag in guide. Could be something else...

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by