📄 demo_emgmm.html
字号:
<span class=quotes>'Parent'</span>,haxes2,...<br> <span class=quotes>'VerticalAlignment'</span>,<span class=quotes>'bottom'</span>,...<br> <span class=quotes>'Units'</span>,<span class=quotes>'normalized'</span>,...<br> <span class=quotes>'HorizontalAlignment'</span>,<span class=quotes>'left'</span>,...<br> <span class=quotes>'Position'</span>,[0 1 0]);<br> htxsteps=xlabel(<span class=quotes>'step number t=0'</span>);<br> <br> <br> <br> <span class=comment>% == Comment Window frame ==============================================
</span><br><span class=comment>%% bottom=0.05;
</span><br><span class=comment>%% height=0.16;
</span><br><span class=comment>%% uicontrol( ...
</span><br><span class=comment>%% 'Style','frame', ...
</span><br><span class=comment>%% 'Units','normalized', ...
</span><br><span class=comment>%% 'Position',[left bottom width height], ...
</span><br><span class=comment>%% 'BackgroundColor',[0.5 0.5 0.5]);
</span><br>
<br> <span class=comment>% Text label
</span><br><span class=comment>% uicontrol( ...
</span><br><span class=comment>% 'Style','text', ...
</span><br><span class=comment>% 'Units','normalized', ...
</span><br><span class=comment>% 'Position',[left height-0.01 width 0.05], ...
</span><br><span class=comment>% 'BackgroundColor',[0.5 0.5 0.5], ...
</span><br><span class=comment>% 'ForegroundColor',[1 1 1], ...
</span><br><span class=comment>% 'String','Comment Window');
</span><br>
<br> <span class=comment>% Edit window
</span><br><span class=comment>%% border=0.01;
</span><br><span class=comment>%% hconsole=uicontrol( ...
</span><br><span class=comment>%% 'Style','edit', ...
</span><br><span class=comment>%% 'HorizontalAlignment','left', ...
</span><br><span class=comment>%% 'Units','normalized', ...
</span><br><span class=comment>%% 'Max',10, ...
</span><br><span class=comment>%% 'BackgroundColor',[1 1 1], ...
</span><br><span class=comment>%% 'Position',[left+border bottom width-2*border height-0.05], ...
</span><br><span class=comment>%% 'Enable','inactive',...
</span><br><span class=comment>%% 'String','');
</span><br><br><br> <span class=comment>% == Buttons ===========================================================
</span><br><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.044;
<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_emgmm('</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_emgmm('</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: begin 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_emgmm('</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_emgmm('</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_emgmm('</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_emgmm('</span><span class=quotes>'getfile'</span><span class=quotes>',gcf)'</span>);
<br><br> <span class=comment>% Save model</span><br> bottom=bottom+1.5*height;
<br> hbtSaveModel = <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>'Save model'</span>, ...
<br> <span class=quotes>'Callback'</span>,<span class=quotes>'demo_emgmm('</span><span class=quotes>'savemodel'</span><span class=quotes>',gcf)'</span>);
<br><br> <span class=comment>% Load model</span><br><span class=comment>% bottom=bottom+1*height;
</span><br><span class=comment>% hbtLoadModel = uicontrol(...
</span><br><span class=comment>% 'Units','Normalized', ...
</span><br><span class=comment>% 'ListboxTop',0, ...
</span><br><span class=comment>% 'Position',[left bottom width height], ...
</span><br><span class=comment>% 'String','Load model', ...
</span><br>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -