请教:如何在图形用户界面(GUI)中交互输入方程求解?
如题,用可编辑文本框?可回调函数怎么能识别? % 文本框输入矩阵并处理close all
figure('position',)
cc='result of matrix +1';
H1=uicontrol(gcf,'style','text',...
'unit','normalized','position',,...
'BackgroundColor',,'ForegroundColor','b',...
'string','show matrix','fontsize',14);
H2=uicontrol(gcf,'style','edit',...
'unit','normalized','position',,...
'BackgroundColor',,'ForegroundColor','b',...
'string','input matrix','fontsize',12,'callback',...
['aa=get(H2,''string'');','set(H1,''string'',aa);']);
set(H2,'Max',100)
H3=uicontrol(gcf,'style','push',...
'unit','normalized','position',,...
'BackgroundColor',,'ForegroundColor','b',...
'string','matrix + 1','fontsize',12,'callback',...
['bb=str2num(aa)+1;','set(H1,''string'',{aa;cc;num2str(bb)});']); 谢谢suffer,可是这个代码好象只可以识别数字,对字符却视而不见啊。这样的话还是不能输入方程啊 高手帮忙看一下撒 加条字符转换语句
页:
[1]