📄 demo_linclass.html
字号:
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_linclass('</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>'Callback'</span>,<span class=quotes>'demo_linclass('</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_linclass('</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_linclass('</span><span class=quotes>'reset'</span><span class=quotes>',gcf)'</span>);<br><br> <span class=comment>% Creat 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_linclass('</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_linclass('</span><span class=quotes>'getfile'</span><span class=quotes>',gcf)'</span>);<br><br> <span class=comment>% == Popup menus ======================================</span><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 height], ...<br> <span class=quotes>'String'</span>,<span class=quotes>'Algorithm'</span>);<br> <span class=comment>% popup menu</span><br> bottom=bottom-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_linclass('</span><span class=quotes>'epshandler'</span><span class=quotes>',gcf)'</span>,...<br> <span class=quotes>'Position'</span>,[left bottom width height], ...<br> <span class=quotes>'String'</span>,ALGOS);<br><br><br> <span class=comment>% == Edit line ========================================</span><br> <span class=comment>% epsilon</span><br> bottom=bottom-1.2*height;<br> htxeps=<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>'Enable'</span>,<span class=quotes>'off'</span>,...<br> <span class=quotes>'String'</span>,<span class=quotes>'epsilon'</span>);<br> bottom=bottom-height;<br> hedeps = <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>'Style'</span>,<span class=quotes>'edit'</span>,...<br> <span class=quotes>'Enable'</span>,<span class=quotes>'off'</span>,...<br> <span class=quotes>'CallBack'</span>,<span class=quotes>'demo_linclass('</span><span class=quotes>'epshandler'</span><span class=quotes>',gcf)'</span>,...<br> <span class=quotes>'String'</span>,<span class=quotes>'1e-2'</span>);<br><br> <span class=comment>% # of iterations</span><br> bottom=bottom-1.1*height;<br> htxiter=<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>'Iterations'</span>);<br><br> bottom=bottom-0.9*height;<br> hediter = <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>'Style'</span>,<span class=quotes>'edit'</span>,...<br> <span class=quotes>'CallBack'</span>,<span class=quotes>'demo_linclass('</span><span class=quotes>'iterhandler'</span><span class=quotes>',gcf)'</span>,...<br> <span class=quotes>'String'</span>,<span class=quotes>'1'</span>);<br><br> <span class=comment>% == Check boxes ==============================================</span><br> <span class=comment>% Make check box to determine if a line will be drawn in one </span><br> <span class=comment>% step or smooth plot.</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> <span class=comment>% ============================================================</span><br> <span class=comment>% Store handlers</span><br> handlers=struct(...<br> <span class=quotes>'line'</span>,struct(<span class=quotes>'handler'</span>,-1,<span class=quotes>'alpha'</span>,0,<span class=quotes>'theta'</span>,0,<span class=quotes>'t'</span>,0),...<br> <span class=quotes>'btstep'</span>,hbtstep,...<br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -