set_my_path.m
来自「ipr函数库与仿真实验程序,都是要用到的库函数。」· M 代码 · 共 28 行
M
28 行
%%%%%%%%%%%%%%% set_my_path.m %%%%%%%%%%%%%%%%%%%
% Discrete-Time Control Problems using %
% MATLAB and the Control System Toolbox %
% by J.H. Chow, D.K. Frederick, & N.W. Chbat %
% Brooks/Cole Publishing Company %
% September 2002 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------- get present location of top-level directory ----
here = pwd
%--- if PC, use backward slash; if Unix or Linux, use forward version --
if ispc,
addpath([here,'\tools'])
addpath([here,'\models'])
disp('Have added models and tools directories to Matlab path')
disp('You can use the ''path'' command to verify it')
elseif isunix,
addpath([here,'/tools'])
addpath([here,'/models'])
disp('Have added models and tools directories to Matlab path')
disp('You can use the ''path'' command to verify it')
else
disp('Platform is not PC and not Unix/Linux, so you must')
disp('set the Matlab path manually to include the ')
disp('directories ''/models'' and ''/tools''')
end
%%%%%%%%%%%%%
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?