📄 fm_xset.m
字号:
function fig = fm_xset()% FM_XSET create GUI for UDM state variables%% HDL = FM_XSET()%%Author: Federico Milano%Date: 11-Nov-2002%Version: 1.0.0%%E-mail: fmilano@thunderbox.uwaterloo.ca%Web-site: http://thunderbox.uwaterloo.ca/~fmilano%% Copyright (C) 2002-2005 Federico Milano%% This toolbox is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 2.0 of the License, or% (at your option) any later version.%% This toolbox is distributed in the hope that it will be useful, but% WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU% General Public License for more details.%% You should have received a copy of the GNU General Public License% along with this toolbox; if not, write to the Free Software% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,% USA.global Theme Fig Stateif Fig.xset, figure(Fig.xset), return, endh0 = figure('Color',Theme.color01, ... 'Units', 'normalized', ... 'Colormap',[], ... 'CreateFcn','Fig.xset = gcf;', ... 'DeleteFcn','Fig.xset = 0;', ... 'FileName','fm_xset', ... 'MenuBar','none', ... 'Name','State Variable Settings', ... 'NumberTitle','off', ... 'PaperPosition',[18 180 576 432], ... 'PaperType','A4', ... 'PaperUnits','points', ... 'Position',sizefig(1.2*0.2375,1.25*0.4775), ... 'Resize','on', ... 'ToolBar','none');% Frame for parameters and settingsh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'ForegroundColor',Theme.color03, ... 'Position',[0.1000 0.1600 0.8000 0.6900], ... 'Style','frame', ... 'Tag','Frame1');% Popup menush(1) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.5000 0.5153 0.3500 0.0409], ... 'Style','popupmenu', ... 'Tag','PopupMenu1', ... 'Value',1);h(2) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.5000 0.5971 0.3500 0.0409], ... 'Style','popupmenu', ... 'Tag','PopupMenu2', ... 'Value',1);h(3) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Callback','fm_comp xtime', ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.5000 0.7587 0.3500 0.0409], ... 'Style','popupmenu', ... 'Tag','PopupMenu5', ... 'Value',1);h(4) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.5000 0.6769 0.3500 0.0409], ... 'String',{'No';'Yes'}, ... 'Style','popupmenu', ... 'Tag','PopupMenu3', ... 'Value',1);h(5) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.5000 0.4356 0.3500 0.0409], ... 'String',{'No';'Yes'}, ... 'Style','popupmenu', ... 'Tag','PopupMenu4', ... 'Value',1);% Push buttonsh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color03, ... 'Callback','fm_comp xset', ... 'FontWeight','bold', ... 'ForegroundColor',Theme.color09, ... 'Position',[0.1000 0.0500 0.2333 0.0700], ... 'String','Ok', ... 'Tag','Pushbutton1');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'Callback','fm_comp xset', ... 'Position',[0.3833 0.0500 0.2333 0.0700], ... 'String','Apply', ... 'Tag','Pushbutton2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'Callback','close(gcf)', ... 'Position',[0.6666 0.0500 0.2333 0.0700], ... 'String','Cancel', ... 'Tag','Pushbutton3');% Frame and edit text for the variable nameh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'ForegroundColor',Theme.color03, ... 'Position',[0.1000 0.8800 0.8000 0.0600], ... 'Style','frame', ... 'Tag','Frame1');h(6) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'FontWeight','bold', ... 'ForegroundColor',Theme.color07, ... 'Position',[0.2000 0.8850 0.6000 0.0400], ... 'Style','text', ... 'Tag','StaticText3');% Static textsh1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','right', ... 'Position',[0.1500 0.5971 0.3250 0.0409], ... 'String','Superior Limit', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','right', ... 'Position',[0.1500 0.5153 0.3250 0.0409], ... 'String','Inferior Limit', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','right', ... 'Position',[0.1500 0.7587 0.3250 0.0409], ... 'String','Time Constant', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','right', ... 'Position',[0.1500 0.6769 0.3250 0.0409], ... 'String','No dynamic', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','right', ... 'Position',[0.1500 0.2065 0.3250 0.0409], ... 'String','Initial guess', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','right', ... 'Position',[0.1500 0.4356 0.3250 0.0409], ... 'String','Offset', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','right', ... 'Position',[0.1500 0.3579 0.3250 0.0409], ... 'String','Matlab Name', ... 'Style','text', ... 'Tag','StaticText2');h1 = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color02, ... 'HorizontalAlignment','right', ... 'Position',[0.1500 0.2822 0.3250 0.0409], ... 'String','TeX Name', ... 'Style','text', ... 'Tag','StaticText2');% Edit textsh(7) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'Callback','fval(gcbo,get(gcbo,''UserData''),0);', ... 'BackgroundColor',Theme.color04, ... 'FontName',Theme.font01, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.5000 0.2065 0.3500 0.0409], ... 'Style','edit', ... 'Tag','EditText1');h(8) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'Enable','inactive', ... 'FontName',Theme.font01, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.5000 0.3579 0.3500 0.0409], ... 'Style','edit', ... 'Tag','Edit_uname');h(9) = uicontrol('Parent',h0, ... 'Units', 'normalized', ... 'BackgroundColor',Theme.color04, ... 'FontName',Theme.font01, ... 'ForegroundColor',Theme.color05, ... 'HorizontalAlignment','left', ... 'Position',[0.5000 0.2822 0.3500 0.0409], ... 'Style','edit', ... 'Tag','Edit_fname');set(h0,'UserData',h)if nargout > 0, fig = h0; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -