📄 enter_distributions.m
字号:
function fig = enter_distributions()
% This is the machine-generated representation of a Handle Graphics object
% and its children. Note that handle values may change when these objects
% are re-created. This may cause problems with any callbacks written to
% depend on the value of the handle at the time the object was saved.
% This problem is solved by saving the output as a FIG-file.
%
% To reopen this object, just type the name of the M-file at the MATLAB
% prompt. The M-file and its associated MAT-file must be on your path.
%
% NOTE: certain newer features in MATLAB may not have been saved in this
% M-file due to limitations of this format, which has been superseded by
% FIG-files. Figures which have been annotated using the plot editor tools
% are incompatible with the M-file/MAT-file format, and should be saved as
% FIG-files.
load enter_distributions
h0 = figure('Units','characters', ...
'Color',[0.8 0.8 0.8], ...
'Colormap',mat0, ...
'FileName','E:\Work\hw\enter_distributions.m', ...
'MenuBar','none', ...
'PaperPosition',[52 11 57 35], ...
'PaperUnits','points', ...
'Position',[52 11 57 35], ...
'Tag','Enter Distributions', ...
'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'ListboxTop',0, ...
'Position',[26.25 84.75 168.75 127.5], ...
'Style','frame', ...
'Tag','frmParams');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'ListboxTop',0, ...
'Position',[26.25 221.25 168.75 26.25], ...
'Style','frame', ...
'Tag','frmHowMany');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'ListboxTop',0, ...
'Position',[26.25 255 168.75 48.75], ...
'Style','frame', ...
'Tag','frmClass');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',12, ...
'FontWeight','bold', ...
'ListboxTop',0, ...
'Position',[15 311.25 187.5 22.5], ...
'String','Manually Enter Distributions', ...
'Style','text', ...
'Tag','txtTitle');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'Callback','enter_distributions_commands(''change_class'',0)', ...
'ListboxTop',0, ...
'Position',[34.5 266.25 63.75 15], ...
'String','Class 0', ...
'Style','radiobutton', ...
'Tag','rbtClass0', ...
'Value',1);
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',[32.25 283.5 153.75 15], ...
'String','Choose class:', ...
'Style','text', ...
'Tag','txtClass');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'Callback','enter_distributions_commands(''change_class'',1)', ...
'ListboxTop',0, ...
'Position',[105 266.25 63.75 15], ...
'String','Class 1', ...
'Style','radiobutton', ...
'Tag','rbtClass1');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'Callback','close', ...
'ListboxTop',0, ...
'Position',[142.5 22.5 54 28.5], ...
'String','OK', ...
'Tag','pshOK');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'HorizontalAlignment','left', ...
'ListboxTop',0, ...
'Position',[30 189.75 64.5 16.5], ...
'String','Gaussian number:', ...
'Style','text', ...
'Tag','txtParameters');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'ListboxTop',0, ...
'Position',[33 225 156 15], ...
'String','There are 1 Gaussians in this class', ...
'Style','text', ...
'Tag','txtCount');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'Callback','enter_distributions_commands(''change_gaussian'')', ...
'ListboxTop',0, ...
'Position',[131.25 191.25 59.25 14.25], ...
'String',mat2, ...
'Style','popupmenu', ...
'Tag','popNumber', ...
'Value',1);
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'ListboxTop',0, ...
'Position',[30 172.5 89.25 14.25], ...
'String','Weight of the Gaussian:', ...
'Style','text', ...
'Tag','txt1');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','enter_distributions_commands(''change_parameter'',gcbo)', ...
'ListboxTop',0, ...
'Position',[131.25 172.5 58.5 15.75], ...
'String','1', ...
'Style','edit', ...
'Tag','txtWeight');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'ListboxTop',0, ...
'Position',[29.25 153.75 90 15], ...
'String','Means of the Gaussian:', ...
'Style','text', ...
'Tag','txt2');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','enter_distributions_commands(''change_parameter'',gcbo)', ...
'ListboxTop',0, ...
'Position',[130.5 154.5 26.25 15], ...
'String','0', ...
'Style','edit', ...
'Tag','txtMeanX');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
'ListboxTop',0, ...
'Position',[30 138.75 105 11.25], ...
'String','Covariance of the Gaussian:', ...
'Style','text', ...
'Tag','txt3');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','enter_distributions_commands(''change_parameter'',gcbo)', ...
'ListboxTop',0, ...
'Position',[131.25 120 41.25 15], ...
'String','0', ...
'Style','edit', ...
'Tag','txtCov12');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','enter_distributions_commands(''change_parameter'',gcbo)', ...
'ListboxTop',0, ...
'Position',[75 120 41.25 15], ...
'String','0', ...
'Style','edit', ...
'Tag','txtCov11');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','enter_distributions_commands(''change_parameter'',gcbo)', ...
'ListboxTop',0, ...
'Position',[75.75 100.5 41.25 15], ...
'String','0', ...
'Style','edit', ...
'Tag','txtCov21');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','enter_distributions_commands(''change_parameter'',gcbo)', ...
'ListboxTop',0, ...
'Position',[131.25 101.25 41.25 15], ...
'String','0', ...
'Style','edit', ...
'Tag','txtCov22');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','enter_distributions_commands(''change_parameter'',gcbo)', ...
'ListboxTop',0, ...
'Position',[163.5 153.75 26.25 15], ...
'String','0', ...
'Style','edit', ...
'Tag','txtMeanY');
if nargout > 0, fig = h0; end
enter_distributions_commands('change_class',0);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -