资源简介
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.\n‘...
‘A new folder “tbxmanager“ is going to be created in the specified location.\n‘...
‘If you do not specify the folder the Toolbox manager will be installed in the current directory.\n‘]);
% get the installation folder
default_dir = pwd;
c = uigetdir(pwd);
if isequal(c0);
fprintf([‘No directory has been provided.\n‘...
‘Installing the toolbox manager in the current directory “%s“?\n‘]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.\nPlease 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“.\n‘...
‘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\n‘);
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\nplease 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安装\tbxmanager\startup.m
文件 171 2019-09-27 14:20 MPT安装\tbxmanager\tbxenabled.txt
文件 39964 2019-09-26 11:01 MPT安装\tbxmanager\tbxmanager.m
文件 44 2019-09-26 11:01 MPT安装\tbxmanager\tbxsources.txt
....... 23242 2013-10-01 22:31 MPT安装\tbxmanager\toolboxes\cddmex\1.0.1\pcwin64\source\cddmex.c
....... 6418 2013-10-01 22:31 MPT安装\tbxmanager\toolboxes\cddmex\1.0.1\pcwin64\source\cddmex.m
....... 87040 2013-10-01 22:34 MPT安装\tbxmanager\toolboxes\cddmex\1.0.1\pcwin64\source\cddmex.mexw64
....... 3184 2012-09-17 16:04 MPT安装\tbxmanager\toolboxes\fourier\1.0\pcwin64\fourier_1_0_pcwin64\fourier.m
....... 13312 2012-09-17 16:04 MPT安装\tbxmanager\toolboxes\fourier\1.0\pcwin64\fourier_1_0_pcwin64\fourier.mexw64
....... 1200 2012-09-17 16:04 MPT安装\tbxmanager\toolboxes\fourier\1.0\pcwin64\fourier_1_0_pcwin64\readme.txt
....... 20365 2013-01-21 16:30 MPT安装\tbxmanager\toolboxes\glpkmex\1.0\pcwin64\glpkmex_1_0_pcwin64\glpkmex_1_0_pcwin64\glpk.m
....... 429056 2013-01-21 16:30 MPT安装\tbxmanager\toolboxes\glpkmex\1.0\pcwin64\glpkmex_1_0_pcwin64\glpkmex_1_0_pcwin64\glpkcc.mexw64
....... 1016334 2012-06-10 22:57 MPT安装\tbxmanager\toolboxes\hysdel\2.0.6\pcwin64\hysdel.exe
....... 21880 2013-06-10 22:51 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp.c
....... 1831 2013-06-10 22:52 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp.h
....... 11490 2013-02-21 19:15 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp.m
....... 34304 2013-08-22 17:47 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp.mexw64
....... 4095 2013-02-21 19:15 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp_compile.m
....... 10852 2013-08-22 17:46 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp_main.c
....... 29513 2013-06-10 22:52 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp_matrix.c
....... 7196 2013-06-10 22:52 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp_matrix.h
....... 28696 2013-06-10 22:52 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp_sfun.c
....... 41472 2013-08-22 17:47 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp_sfun.mexw64
....... 54549 2013-06-06 19:33 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp_sim.mdl
....... 1515 2013-02-21 19:15 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lcp_test.m
....... 15414 2013-02-21 19:15 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\LICENSE.txt
....... 24473 2013-06-10 22:52 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lumod_dense.c
....... 4149 2013-06-10 22:52 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\lumod_dense.h
....... 1546 2013-06-10 17:36 MPT安装\tbxmanager\toolboxes\lcp\1.0.3\pcwin64\source\README.txt
............此处省略4141个文件信息
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
- 检测疲劳驾驶
- Matlab锁相环仿真-Phase Locked Loop.rar
评论
共有 条评论