⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sf_tool.m

📁 CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
💻 M
字号:
function fig = sf_tool()

% Enumerate states in a Stateflow chart
%
% Syntax:
%   "sf_tool"
%
% Description:
%   "sf_tool" provides controls which can be used to enumerate states in
%   a Stateflow chart.  This is useful in CheckMate as each state must
%   have an entry action which assigns a unique value to the output.
%   "sf_tool" can be used to accomplish this.  Once a chart is selected,
%   the push of a button enumerates each state and returns the name,
%   numer and id of each state.
%
% See Also:
%   sf_tool_callback

% 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.
%
% 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.

load sf_tool

h0 = figure('Color',[0.8 0.8 0.8], ...
	'Colormap',mat0, ...
	'Name','Stateflow Tool', ...
	'NumberTitle','off', ...
	'Position',[232 258 560 420], ...
	'Resize','off', ...
	'Tag','Fig1');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
	'ListboxTop',0, ...
	'Position',[12 133 267 89], ...
	'Style','frame', ...
	'Tag','Frame1');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
	'Callback','sf_tool_callback(''current_system'')', ...
	'ListboxTop',0, ...
	'Position',[146 181 122 30], ...
	'String','Current System', ...
	'Tag','Pushbutton1');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[1 1 1], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[22 150 247 22], ...
	'Style','edit', ...
	'Tag','EditText1');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
	'ListboxTop',0, ...
	'Position',[18 180 97 20], ...
	'String','Simulink Model', ...
	'Style','text', ...
	'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
	'ListboxTop',0, ...
	'Position',[12 50 267 75], ...
	'Style','frame', ...
	'Tag','Frame1');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
	'Callback','sf_tool_callback(''number_current_chart'')', ...
	'ListboxTop',0, ...
	'Position',[29 63.5 100 30], ...
	'String','Current Chart', ...
	'Tag','Pushbutton1');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
	'Callback','sf_tool_callback(''number_all_charts'')', ...
	'ListboxTop',0, ...
	'Position',[161 63.5 100 30], ...
	'String','All Charts', ...
	'Tag','Pushbutton1');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
	'Callback','sf_tool_callback(''close'')', ...
	'ListboxTop',0, ...
	'Position',[201 10 65 30], ...
	'String','Close', ...
	'Tag','Pushbutton1');
h1 = uicontrol('Parent',h0, ...
	'BackgroundColor',[0.701960784313725 0.701960784313725 0.701960784313725], ...
	'ListboxTop',0, ...
	'Position',[14 97 127 20], ...
	'String','Enumerate states in', ...
	'Style','text', ...
	'Tag','StaticText2');
if nargout > 0, fig = h0; end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -