我设计了一个Pushbutton,刚开始显示“开始”,点击之后显示“暂停”,再点击之后显示“开始”,
machine1start=uicontrol(machine1,...
'Style','Pushbutton',...
'Position',[50,180,80,30],...
'String','开始',...
'CallBack',...
['k=get(machine1start,''String'');'...
'if (k==''开始''); '...
'set(machine1start,''String'',''暂停'');'...
'else ;',...
'set(machine1start,''String'',''开始'');'...
]);
运行错误:??? Error using ==> k=get(machine1start,'String');if (k=='开始'); set(machine1start,'String','暂停');else
;set(machine1start,'String','开始');
Error: The input character is not valid in MATLAB statements or expressions.
??? Error while evaluating uicontrol Callback
呼如林
相关分类