📄 demo_anderson.html
字号:
<span class=comment>% Text label</span><br> <span class=graph>uicontrol</span>( ...<br> <span class=quotes>'Style'</span>,<span class=quotes>'text'</span>, ...<br> <span class=quotes>'Units'</span>,<span class=quotes>'normalized'</span>, ...<br> <span class=quotes>'Position'</span>,[left height-0.01 width 0.05], ...<br> <span class=quotes>'BackgroundColor'</span>,[0.5 0.5 0.5], ...<br> <span class=quotes>'ForegroundColor'</span>,[1 1 1], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Comment Window'</span>);<br><br> <span class=comment>% Edit window</span><br> border=0.01;<br> hconsole=<span class=graph>uicontrol</span>( ...<br> <span class=quotes>'Style'</span>,<span class=quotes>'edit'</span>, ...<br> <span class=quotes>'HorizontalAlignment'</span>,<span class=quotes>'left'</span>, ...<br> <span class=quotes>'Units'</span>,<span class=quotes>'normalized'</span>, ...<br> <span class=quotes>'Max'</span>,10, ...<br> <span class=quotes>'BackgroundColor'</span>,[1 1 1], ...<br> <span class=quotes>'Position'</span>,[left+border bottom width-2*border height-0.05], ...<br> <span class=quotes>'Enable'</span>,<span class=quotes>'inactive'</span>,...<br> <span class=quotes>'String'</span>,<span class=quotes>''</span>);<br><br><br> <span class=comment>% == Buttons ===========================================================</span><br> <span class=comment>% -- Export to EPS ---------</span><br> width=0.1;<br> left=0.75-width;<br> bottom=0.95;<br> height=0.04;<br> hbtclose = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'fig2eps(gcf)'</span>,...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'FIG2EPS'</span>);<br> <span class=comment>%----------------------------------</span><br><br> <span class=comment>% Close button</span><br> left=0.8;<br> bottom=0.05;<br> height=0.05;<br> width=0.15;<br> hbtclose = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'close(gcf)'</span>,...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Close'</span>);<br><br> <span class=comment>% Info button: call stanard info box</span><br> bottom=bottom+1.5*height;<br> hbtinfo = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'demo_anderson('</span><span class=quotes>'info'</span><span class=quotes>',gcf)'</span>,...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Info'</span>);<br><br> <span class=comment>% Step button: perform one adaptation step</span><br> bottom=bottom+1.5*height;<br> hbtstep = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Step'</span>, ...<br> <span class=quotes>'Interruptible'</span>,<span class=quotes>'off'</span>,...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'demo_anderson('</span><span class=quotes>'step'</span><span class=quotes>',gcf)'</span>);<br><br> <span class=comment>% Stop button: stop process of adaptation</span><br> bottom=bottom+height;<br> hbtstop = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Stop'</span>, ...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'set(gcbo,'</span><span class=quotes>'UserData'</span><span class=quotes>',1)'</span>,...<br> <span class=quotes>'Enable'</span>,<span class=quotes>'off'</span>);<br><br> <span class=comment>% Play button: start up adaptation</span><br> bottom=bottom+height;<br> hbtplay = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Play'</span>, ...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'demo_anderson('</span><span class=quotes>'play'</span><span class=quotes>',gcf)'</span>);<br><br> <span class=comment>% Reset button: set up t = 0</span><br> bottom=bottom+height;<br> hbtreset = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Reset'</span>, ...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'demo_anderson('</span><span class=quotes>'reset'</span><span class=quotes>',gcf)'</span>);<br><br> <span class=comment>% Create data</span><br> bottom=bottom+1.5*height;<br> hbtcreat = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Create data'</span>, ...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'demo_anderson('</span><span class=quotes>'creatdata'</span><span class=quotes>',gcf)'</span>);<br><br> <span class=comment>% Load data</span><br> bottom=bottom+1*height;<br> hbtload = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Units'</span>,<span class=quotes>'Normalized'</span>, ...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Load data'</span>, ...<br> <span class=quotes>'Callback'</span>,<span class=quotes>'demo_anderson('</span><span class=quotes>'getfile'</span><span class=quotes>',gcf)'</span>);<br><br> <span class=comment>% == Check boxes ===============================================================</span><br><br> <span class=comment>% Make chack box to determine if a line will be drawn in one step or smoothly.</span><br> bottom=bottom+height*1.2;<br> hxbanim = <span class=graph>uicontrol</span>(...<br> <span class=quotes>'Style'</span>,<span class=quotes>'checkbox'</span>, ...<br> <span class=quotes>'Units'</span>,<span class=quotes>'normalized'</span>, ...<br> <span class=quotes>'ListboxTop'</span>,0, ...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Animation'</span>);<br><br><br> <span class=comment>% == Popup menus ==========================================================</span><br><br> <span class=comment>% Pop up menu for the selection between algorithms</span><br> <span class=comment>% title</span><br> bottom=0.95-height;<br> htxalgo=<span class=graph>uicontrol</span>( ...<br> <span class=quotes>'Style'</span>,<span class=quotes>'text'</span>, ...<br> <span class=quotes>'Units'</span>,<span class=quotes>'normalized'</span>, ...<br> <span class=quotes>'Position'</span>,[left bottom width 0.9*height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Algorithm'</span>);<br> <span class=comment>% popup menu</span><br> bottom=bottom-0.9*height;<br> hpualgo=<span class=graph>uicontrol</span>( ...<br> <span class=quotes>'Style'</span>,<span class=quotes>'popup'</span>, ...<br> <span class=quotes>'Units'</span>,<span class=quotes>'normalized'</span>, ...<br> <span class=quotes>'CallBack'</span>,<span class=quotes>'demo_anderson('</span><span class=quotes>'algohandler'</span><span class=quotes>',gcf)'</span>,...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'UserData'</span>,1,...<br> <span class=quotes>'String'</span>,ALGONAMES);<br><br><br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -