I transfered my guide app to app designe
% Button pushed function: pushbutton1
function pushbutton1_Callback(app, event) x=get(hObject,'String'); if strcmp(x,'Play') load_system('equalizer1'); set_param('equalizer1', 'SimulationCommand', 'start'); set(hObject,'String', 'Pause'); else if strcmp(x,'Play') set_param('equalizer1', 'SimulationCommand', 'pause'); set(hObject,'String', 'Play'); end end
It opens simulink model that is an equalizer. I got an error
Undefined function or variable 'hObject'.Error in equal_App_exported/pushbutton1_Callback x=get(hObject,'String');
I don't really know how to change it, like how to create an hObject in order to make it work properly.
Best Answer