📄 mvtools.m
字号:
% MvTools Script file:
% Starts MvTools GUI (Matlab ver 5.3 or higher)
% (The MvTools main folder should be in the Matlab path)
%
% Massimo Davini 12/05/99 --- revised 31/05/00
% modified by giampy, dec 03
% it does not clear the workspace anymore
% revised on march 05 to adapt to matlab 7
versione=version;
if str2num(versione(1:3))<5.3
disp(sprintf('\n'))
disp(' ERROR : Matlab''s version NOT COMPATIBLE .')
disp(' Mvtools is designed for Matlab version 5.3 (or higher) !')
disp(sprintf('\n'))
clear versione;
return;
end;
if exist('stack') & isfield(stack,'general')
disp(sprintf('\n'))
disp(' ERROR : MvTools can have only one active session')
disp(' at a time for each Matlab command window')
disp(sprintf('\n'))
clear versione;
return;
end;
if isempty(ver('control'))
disp(sprintf('\n'))
disp(' ERROR : It''s impossible to run MvTools because')
disp(' of the absence of the Control Toolbox')
disp(sprintf('\n'))
end;
if str2num(versione(1:3))>=7 & str2num(versione(3:5))>0,
if isempty(ver('robust')),
disp(sprintf('\n'))
disp(' ERROR : It''s impossible to run MvTools because')
disp(' of the absence of the Robust Control Toolbox')
disp(sprintf('\n'))
end
else
% versions before 7 used to have independent control toolboxes
if isempty(ver('mutools'))|isempty(ver('lmi')),
if isempty(ver('lmi'))
if ~isempty(ver('control')) disp(sprintf('\n'));end;
disp(' ERROR : It''s impossible to run MvTools because of')
disp(' the absence of the LMI Toolbox')
disp(sprintf('\n'))
end;
if isempty(ver('mutools'))
if ~isempty(ver('control')) & ~isempty(ver('lmi')), disp(sprintf('\n'));end;
disp(' ERROR : It''s impossible to run MvTools because of')
disp(' the absence of the Mu-Tools Toolbox')
disp(sprintf('\n'))
end;
else
if isempty(ver('robust'))
disp(sprintf('\n'))
disp(' WARNING : Some functionality will be disabled because of')
disp(' the absence of the Robust Control Toolbox .')
disp(sprintf('\n'))
end;
if isempty(ver('optim'))
disp(sprintf('\n'))
disp(' WARNING : The Optimization section will be disabled because')
disp(' of the absence of the Optimization Toolbox .')
disp(sprintf('\n'))
end;
end;
end
clear versione;
old_path=cd;
%directory di chiamata e di ritorno all'uscuta di Mvtools
path(old_path,path);
%Nuova directory di lavoro.
mvt_path=which('mvtools.m');
mvt_path=mvt_path(1:length(mvt_path)-9);
cd(mvt_path);
%Inserisce nel path di Matlab la directory del JTOOLS
%la directory ForAll e la directory Helps
path([mvt_path,'ForAll'],path);
path([mvt_path,'JTOOLS'],path);
path([mvt_path,'HELPS'],path);
clear mvt_path;
%salva il workspace (con la directory di ritorno ed il
%nome del file usato per memorizzarlo)
mvt_hf=figure('unit','normalized',...
'position',[.5-.345,.5-.275,.69,.55],...
'resize','off','selected','on',...
'CloseRequestFcn','esci;','color',[0.6 0.7 0.9],...
'NumberTitle','off','menubar','none','visible','off',...
'Name',' MvTools : MULTIVARIABLE TOOLS for Linear Systems',...
'Tag','MvMain');
set(mvt_hf,'unit','characters');
mvt_a=get(gcf,'position');
set(gcf,'position',[mvt_a(1),mvt_a(2),95,20]);
set(gcf,'unit','normalized');
set(gcf,'visible','off');
cd model;
global stack;
stack=struct('general',[],'evaluation',[],'simulation',[],'temp',[]);
stack.general.old_path=old_path;
clear mvt_hf mvt_a old_path
warning off;
avvio_1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -