Matlab MPT工具箱 MPT3.2.1 (2019更新 稳定版 附带帮助文档与多个)


MPT是一个基于Matlab的开源工具箱,用于参数优化,计算几何和模型预测控制。 该版本是MPT3.2.1 2019年最新更新稳定版。附带帮助文档与多个例子。
资源截图
代码片段和文件信息
%% installation of tbxmanager with all submodels required for MPT
%

clc;
disp(‘----------------------------------------------‘);
disp(‘Installation of MPT using the Toolbox manager.‘);
disp(‘----------------------------------------------‘);
disp(‘ ‘);
fprintf([‘Choose the installation directory where to install the Toolbox manager.
‘...
      ‘A new folder “tbxmanager“ is going to be created in the specified location.
‘...
      ‘If you do not specify the folder the Toolbox manager will be installed in the current directory.
‘]);

% get the installation folder
default_dir = pwd;
c = uigetdir(pwd);
if isequal(c0);
    fprintf([‘No directory has been provided.
‘... 
        ‘Installing the toolbox manager in the current directory “%s“?
‘]default_dir);
    c = default_dir;
end
 
% create a new directory in that folder
d = [cfilesep‘tbxmanager‘];
if isequal(exist(d‘dir‘)7)
    error(‘The installation directory “%s“ already exists.
Please remove or rename the folder or change the installation path.‘d);
end
disp(‘Creating the directory “tbxmanager“.‘);
out = mkdir(d);
if ~out
    error([‘An error appear when trying to create the folder “%s“.
‘...
          ‘Please install the Toolbox manager manually.‘]c); 
end

% enter that directory
cd(d);

% remove MPT2 or YALMIP
disp(‘ ‘);
disp(‘Removing toolboxes that may conflict with MPT from the Matlab path.‘);
rmpath(genpath(fileparts(which(‘mpt_init‘))));
rmpath(genpath(fileparts(which(‘yalmipdemo‘))));


% download the tbxmanager
disp(‘ ‘);
disp(‘Downloading the Toolbox manager from the internet.‘);
[f c] = urlwrite(‘http://www.tbxmanager.com/tbxmanager.m‘ ‘tbxmanager.m‘);
rehash;

if isequal(c0)
    error(‘Could not download the Toolbox manager from the internet. The installation cannot continue.‘);
end

% install all required modules
tbxmanager install mpt mptdoc cddmex fourier glpkmex hysdel lcp sedumi yalmip 

% create the initialization file to set the path 
disp(‘ ‘);
disp(‘Creating the initialization file “startup.m“.‘);
p = which(‘startup.m‘);
if isempty(p)
    p = [dfilesep‘startup.m‘];
end
fid = fopen(p‘a‘);
if isequal(fid-1)
    error([‘Could not modify the initialization file “startup.m“.‘...
           ‘Edit this file in the folder “%s“ manually and insert there the line:  tbxmanager restorepath.‘]p);
end
fprintf(fid‘tbxmanager restorepath
‘);
fclose(fid);
disp(‘File has been created.‘);

% get back to the original directory
cd(default_dir);

% add path to tbxmanager
disp(‘ ‘);
disp(‘Adding path to Matlab.‘);
addpath(d);

% save path for future
disp(‘ ‘);
disp(‘Saving path for future sessions.‘);
status = savepath;

if status
    fprintf(‘Could not save the path to a default location
please provide a location where you want to save the path.‘);
    cn = uigetdir(pwd);
    if isequal(cn0)
        disp(‘ ‘);
        fprintf(‘No directory specified saving the path to the c

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3535  2019-09-26 10:53  MPT安装install_mpt3.m

     文件         23  2019-09-26 11:11  MPT安装 bxmanagerstartup.m

     文件        171  2019-09-27 14:20  MPT安装 bxmanager bxenabled.txt

     文件      39964  2019-09-26 11:01  MPT安装 bxmanager bxmanager.m

     文件         44  2019-09-26 11:01  MPT安装 bxmanager bxsources.txt

    .......     23242  2013-10-01 22:31  MPT安装 bxmanager oolboxescddmex1.0.1pcwin64sourcecddmex.c

    .......      6418  2013-10-01 22:31  MPT安装 bxmanager oolboxescddmex1.0.1pcwin64sourcecddmex.m

    .......     87040  2013-10-01 22:34  MPT安装 bxmanager oolboxescddmex1.0.1pcwin64sourcecddmex.mexw64

    .......      3184  2012-09-17 16:04  MPT安装 bxmanager oolboxesfourier1.0pcwin64fourier_1_0_pcwin64fourier.m

    .......     13312  2012-09-17 16:04  MPT安装 bxmanager oolboxesfourier1.0pcwin64fourier_1_0_pcwin64fourier.mexw64

    .......      1200  2012-09-17 16:04  MPT安装 bxmanager oolboxesfourier1.0pcwin64fourier_1_0_pcwin64
eadme.txt

    .......     20365  2013-01-21 16:30  MPT安装 bxmanager oolboxesglpkmex1.0pcwin64glpkmex_1_0_pcwin64glpkmex_1_0_pcwin64glpk.m

    .......    429056  2013-01-21 16:30  MPT安装 bxmanager oolboxesglpkmex1.0pcwin64glpkmex_1_0_pcwin64glpkmex_1_0_pcwin64glpkcc.mexw64

    .......   1016334  2012-06-10 22:57  MPT安装 bxmanager oolboxeshysdel2.0.6pcwin64hysdel.exe

    .......     21880  2013-06-10 22:51  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp.c

    .......      1831  2013-06-10 22:52  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp.h

    .......     11490  2013-02-21 19:15  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp.m

    .......     34304  2013-08-22 17:47  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp.mexw64

    .......      4095  2013-02-21 19:15  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp_compile.m

    .......     10852  2013-08-22 17:46  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp_main.c

    .......     29513  2013-06-10 22:52  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp_matrix.c

    .......      7196  2013-06-10 22:52  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp_matrix.h

    .......     28696  2013-06-10 22:52  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp_sfun.c

    .......     41472  2013-08-22 17:47  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp_sfun.mexw64

    .......     54549  2013-06-06 19:33  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp_sim.mdl

    .......      1515  2013-02-21 19:15  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelcp_test.m

    .......     15414  2013-02-21 19:15  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourceLICENSE.txt

    .......     24473  2013-06-10 22:52  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelumod_dense.c

    .......      4149  2013-06-10 22:52  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourcelumod_dense.h

    .......      1546  2013-06-10 17:36  MPT安装 bxmanager oolboxeslcp1.0.3pcwin64sourceREADME.txt

............此处省略4141个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)