bitstar 发表于 2006-5-30 11:21

[求助]请教界面制作高手!!!!

hf=figure('color',,'position',,...'name','shuzhizhaunghuan','numberTitle','off','menubar','none');
uicontrol(hf,'style','Text','Units','normalized',...'position',,'horizontal','center',...'string','shurukuang','back',);
uicontrol(hf,'style','Text','Units','normalized',...'position',,'horizontal','center',...'string','shucukuang','back',);
uicontrol(hf,'style','Frame','position',,...'Units','normalized','back',);
uicontrol(hf,'style','Text','position',,... 'Units','normalized','horizontal','center',...'string','shijinzhis','back',);
uicontrol(hf,'style','Text','position',,... 'Units','normalized','horizontal','center',...'string','2jinzhis','back',);
he1=uicontrol(hf,'style','Edit','position',,... 'Units','normalized','back',);
he2=uicontrol(hf,'style','Edit','position',,... 'Units','normalized','back',);
uicontrol(hf,'style','Frame','position',,...'Units','normalized','back',);
ht=uicontrol(hf,'style','Text','position',,...'horizontal','center','Units','normalized','back',);
COMM=['n=str2num(get(he1,"sting"));','b=st2num(get(he2,"string"));'...'dec=trdec(n,b);'set(ht,"string",dec);'];
uicontrol(hf,'style','push','position',,...'string','zhuanhuan','Units','normalized','call',COMM);
uicontrol(hf,'style','push','position',,...'string','tuichu','Units','normalized','call','close(hf)');

bitstar 发表于 2006-5-30 11:22

看看上面的程序,哪个地方错了
不胜感激!!!!
做一个界面的

bitstar 发表于 2006-5-30 14:47

还有一个m文件我没有发上去 要调用的trdec.m 文件我没有发
trdec.m文件肯定没有错误

suffer 发表于 2006-5-30 16:18

怎么贴的代码乱乱的,没办法看,先把代码整理清楚了

bitstar 发表于 2006-5-30 18:16

hf=figure('color',,'position',,...
'name','数字转换','numberTitle','off','menubar','none');
uicontrol(hf,'style','Text','Units','normalized',...
'position',,'horizontal','center',...
'string','输入筐','back',);
uicontrol(hf,'style','Text','Units','normalized',...
'position',,'horizontal','center',...
'string','输出筐','back',);
uicontrol(hf,'style','Frame','position',,...
'Units','normalized','back',);
uicontrol(hf,'style','Text','position',,...
'Units','normalized','horizontal','center',...
'string','十进制','back',);
uicontrol(hf,'style','Text','position',,...
'Units','normalized','horizontal','center',...
'string','2和16进制','back',);
he1=uicontrol(hf,'style','Edit','position',,...
'Units','normalized','back',);
he2=uicontrol(hf,'style','Edit','position',,...
'Units','normalized','back',);
uicontrol(hf,'style','Frame','position',,...
'Units','normalized','back',);
ht=uicontrol(hf,'style','Text','position',,...
'horizontal','center','Units','normalized','back',);
COMM=['n=str2num(get(he1,"string"));','b=str2num(get(he2,"string"));',...
'dec=trdec(n,b);','set(ht,"string",dec);'];
uicontrol(hf,'style','push','position',,...
'string','转换','Units','normalized','callback','COMM');
uicontrol(hf,'style','push','position',,...
'string','退出','Units','normalized','call','close(hf)');

bitstar 发表于 2006-5-30 18:18

界面出来了
但是调用的函数文件没有起作用!!!!

happy 发表于 2006-5-30 20:59

我这里没有trdec这个程序,没办法帮你调试
不过你这个问题和帖子
http://forum.vibunion.com/thread-8938-1-1.html
给的例子是一模一样的,你参照修改一下
页: [1]
查看完整版本: [求助]请教界面制作高手!!!!