zhdgzhdg 发表于 2006-4-1 08:39

MATLAB的隐藏特性

<P>刚刚从MathWorks上学到的,版上也有人问过,与大家分享 <BR>看完下面四段,你会有意外收获,即使你不想生成一个最大化窗口 <BR><BR>------------------------------------------------------ <BR>这是我的原文: <BR>How to create a maximized figure window ? <BR>I usually use <BR>   h = figure; <BR>   set(h,'position',); <BR>to get similar result. But it's stupid. <BR>------------------------------------------------------ <BR>us的Re文: <BR>another solution <BR><BR>   set(gcf,'outerposition',... <BR>         get(0,'screensize')); <BR>... just make sure that <BR>   get(gcf,'units') <BR>equals <BR>   get(0,'units') <BR>------------------------------------------------------ <BR>Alex的Re文: <BR>Nice trick, us, <BR><BR>question is, why a useful feature like this one is not   <BR>documented (as I just read in technote 1204)? <BR><BR>regards, -Alex. <BR>------------------------------------------------------ <BR>us的再次re文: <BR>because officially it's an &lt;undocumented&gt; feature. <BR>undoc features of each g-handle can be retrieved with this small code <BR>snippet: <BR><BR>% eg, get a figures undocs <BR>% ... start with yet another undoc :-) <BR>    set(0,'hideundocumented','off'); <BR>    f=get(gcf); <BR>    set(0,'hideundocumented','on'); <BR>    g=get(gcf); <BR>    ff=fieldnames(f); <BR>    gf=fieldnames(g); <BR>    df=ismember(ff,gf); <BR>    ff(~df) <BR>us <BR>------------------------------------------------------ <BR>我试了一下真的发现好多隐藏特性,以后每个句柄都可以试试了</P>
页: [1]
查看完整版本: MATLAB的隐藏特性