h_main=figure('name','a demo of','menubar','none','numbertitle','off','position',[100,100,300,100]);
h_edit=uicontrol('style','edit','backgroundcolor',[1,1,1],'position',[20,20,50,20],...
'tag','myedit','string','1','horizontal','left');
h_but1=uicontrol('style','pushbutton','position',[20,50,50,20],'string','INC',...
'callback',['h=findobj(gcf,"tag","myedit");','v=eval(get(h,"string"));','set(h,"string",int2str(v+1));']);
??? Error using ==> h=findobj(gcf,"tag","myedit");v=eval(get(h,"string"));set(h,"string",int2str(v+1));
Error: The input character is not valid in MATLAB statements or expressions.
芜湖不芜
相关分类