install.m

来自「一个matlab的将军模型」· M 代码 · 共 56 行

M
56
字号
function install(root)

% Install CheckMate by adding CheckMate's m-files to MATLAB's path.
%
% Syntax:
%   "install(root)"
%
% Description:
%   CheckMate can be installed by calling "install(root)" with the string
%   "root" containing the path to CheckMate's root directory. If the
%   argument "root" is not specified, it is assumed that the current
%   directory is the root directory of CheckMate.
%
% See Also:
%   AboutCheckMate,HelpCheckMate

if ~exist('root')
  root = pwd;
end

adddir([root]);
adddir([root '/frontend']);
adddir([root '/frontend/icon'])
adddir([root '/frontend/slutil'])
adddir([root '/frontend/gui'])
adddir([root '/frontend/piha'])
adddir([root '/ACTL']);
adddir([root '/approximation']);
adddir([root '/approximation/partition'])
adddir([root '/approximation/flowpipe'])
adddir([root '/approximation/flowpipe/clock'])
adddir([root '/approximation/flowpipe/linear'])
adddir([root '/approximation/flowpipe/nonlinear'])
adddir([root '/approximation/flowpipe/dha'])
adddir([root '/approximation/util'])
adddir([root '/polylib']);
adddir([root '/tools']);
% adddir([root '/doc']);
adddir([root '/exploration']);
fprintf(1,'CheckMate installed at ''%s''.\n',root)
AboutCheckMate
type([root '/disclaim.txt'])
fprintf(1,'\nNOTE: To save CheckMate paths, select "Set Path" from File menu and press Save.\n\n');
fprintf(1,'Type cmhelp for help using CheckMate.\n\n');
return

% ------------------------------------------------------------------------------------

function adddir(directory)

if isempty(dir(directory))
  error(['Directory ' directory ' not found!'])
else
  addpath(directory)
end

⌨️ 快捷键说明

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