?? cmnew.m
字號:
function cmnew()
% Create a new CheckMate model in Simulink
%
% Syntax:
% "cmnew"
%
% Description:
% "cmnew" opens a new (untitled) Simulink diagram containing the permissible
% blocks for use in building a CheckMate model.
%
% See Also:
% verify,validate
template = 'template';
sys = unique_sys_name;
new_system(sys)
if isempty(find_system('Name',template))
% Open template but hide it from view
load_system(template)
end
location = get_param(template,'Location');
set_param(sys,'Location',location);
% Copy all blocks from template
blocks = get_param(template,'Blocks');
for k = 1:length(blocks)
add_block([template '/' blocks{k}],[sys '/' blocks{k}]);
end
open_system(sys)
return
% -----------------------------------------------------------------------------
function sys = unique_sys_name();
sys = 'untitled';
count = 0;
while ~isempty(find_system('SearchDepth',0,'Name',sys))
count = count + 1;
sys = ['untitled' num2str(count)];
end
return
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -