MATLABGUI编程技巧.docVIP

  • 22
  • 0
  • 约4.2万字
  • 约 35页
  • 2016-11-23 发布于江苏
  • 举报
Matlab GUI编程技巧 1. 如何使gui编的界面一运行就居中?a假如当前的figure的句柄是h,则在程序运行的刚开始,用这个命令, ? ?? ?? ?? ?? ? set(h,visible,off);? ?? ?? ???%使h对应的图不可见. b 然后你再进行你的其它的操作, c最后,在程序的结尾部分,用这两个语句: ? ?? ?? ?? ?? ?? ?? ?movegui(h,center);? ?%将这个图移到中央.详细用法参阅help??movegui ? ?? ?? ?? ?? ?? ?? ?set(h,visible,on);? ???%恢复其可见性. function figureMiddled figure; set(0,units,pixels); set(gcf,units,pixels); screenrect=get(0,screensize); screenwidth=screenrect(3); screenheight=screenrect(4); figwidth=600; figheight=200; figposition=[(screenwidth/2-figwidth/2) ... ? ? (screenheight/2-figheight/2)... ? ? figwidth figheight]; set(gcf,positi

文档评论(0)

1亿VIP精品文档

相关文档