声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1290|回复: 1

[GUI界面] 图形界面程序问题

[复制链接]
发表于 2007-3-15 14:23 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
clf reset
H=axes('unit','normalized','position',[0,0,1,1],'visible','off');
set(gcf,'currentaxes',H);
h_fig=get(H,'parent');
 set(h_fig,'unit','normalized','position',[0.1,0.2,0.7,0.4]);
 h_axes=axes('parent',h_fig,...
    'unit','normalized','position',[0.1,0.15,0.55,0.7],...
    'xlim',[0 15],'ylim',[0 1.8],'fontsize',8);
h_text=uicontrol(h_fig,'style','text',...
    'unit','normalized','position',[0.67,0.73,0.25,0.14],...
    'horizonal','left','string','zeta=');
h_edit=uicontrol(h_fig,'style','edit',...
    'unit','normalized','position',[0.67,0.59,0.25,0.14],...
    'horizonal','left',...
    'callback',[...
    'z=str2num(get(gcbo,"string"));'...
    't=0:0.1:15;',...
    'for k=1:length(z);',...
    's2=tf(1,[1 2*z(k) 1]);',...
    'y(:,k)=step(s2,t);',...
    'plot(t,y(:,k));',...
    'if(length(z)>1),hold on, end,',...
    'end;',...
    'hold off,']);
h_push1=uicontrol(h_fig,'style','push',...
    'unit','normalized','position',[0.67,0.37,0.12,0.15],...
    'string','grid on','callback','grid on');
h_push2=uicontrol(h_fig,'style','push',...
    'unit','normalized','position',[0.67,0.15,0.12,0.15],...
    'string','grid off','callback','grid off');

运行后:
??? Error using ==> uicontrol
Invalid uicontrol property: 'horizonal'.
第9行:h_text=uicontrol(h_fig,'style','text',...出现错误.
  我是GUI菜鸟,MATLAB新手,请高人指点,谢谢!
回复
分享到:

使用道具 举报

发表于 2007-3-15 19:46 | 显示全部楼层
原帖由 bssuda 于 2007-3-15 14:23 发表
clf reset
H=axes('unit','normalized','position',,'visible','off');
set(gcf,'currentaxes',H);
h_fig=get(H,'parent');
 set(h_fig,'unit','normalized','position',);
 h_axes=axes('parent',h_fig ...



uicontrol 这个控件没有 'horizonal' 属性,自己help一下吧
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-19 12:36 , Processed in 0.067175 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表