windows os における...001 %matlabrc master startup m-file. 002 % matlabrc is automatically...
TRANSCRIPT
![Page 1: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/1.jpg)
Windows OS における
YALMIP のインストール
2011 年 1 月 26 日作成
2016 年 4 月 4 日更新
舞鶴高専 川田 昌克
![Page 2: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/2.jpg)
YALMIP:準備
SeDuMi をインストールしておく
インストール手順は
http://www.maizuru-ct.ac.jp/control/
kawata/iscie/doc/install_sedumi_new.pdf
を参照
SDPT3 をインストールしておく
インストール手順は
http://www.maizuru-ct.ac.jp/control/
kawata/iscie/doc/install_sdpt3_new.pdf
を参照
![Page 3: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/3.jpg)
YALMIP:ダウンロード (1/3)
http://users.isy.liu.se/johanl/yalmip/ にアクセス
クリック
![Page 4: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/4.jpg)
YALMIP:ダウンロード (2/3)
クリック(最新バージョンをダウンロード)
![Page 5: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/5.jpg)
適当なフォルダに YALMIP.zip を保存
YALMIP:ダウンロード (3/3)
![Page 6: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/6.jpg)
YALMIP:インストール (1/4)
適当なフォルダに YALMIP.zip を解凍し,
フォルダ yalmip を生成
![Page 7: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/7.jpg)
YALMIP:インストール (2/4)
たとえば,C ドライブのフォルダ hoge の中にフォルダ
sedumi-master, SDPT3-4.0, yalmip を置いた場合,
>> addpath(genpath('C:¥hoge¥sedumi-master'))>> addpath(genpath('C:¥hoge¥SDPT3-4.0'))>> addpath(genpath('C:¥hoge¥yalmip'))
>> path
MATLABPATH
C:¥hoge¥yalmipC:¥hoge¥yalmip¥demosC:¥hoge¥yalmip¥extrasC:¥hoge¥yalmip¥modulesC:¥hoge¥yalmip¥modules¥bilevelC:¥hoge¥yalmip¥modules¥globalC:¥hoge¥yalmip¥modules¥momentC:¥hoge¥yalmip¥modules¥parametricC:¥hoge¥yalmip¥modules¥robustC:¥hoge¥yalmip¥modules¥sosC:¥hoge¥yalmip¥operatorsC:¥hoge¥yalmip¥solvers
と入力して,パスを通す.パスが通ったことは,
と入力することで確認できる.
C:¥hoge¥SDPT3-4.0C:¥hoge¥SDPT3-4.0¥ExamplesC:¥hoge¥SDPT3-4.0¥HSDSolverC:¥hoge¥SDPT3-4.0¥HSDSolver¥etcC:¥hoge¥SDPT3-4.0¥SolverC:¥hoge¥SDPT3-4.0¥Solver¥MexfunC:¥hoge¥SDPT3-4.0¥Solver¥Mexfun¥OldfilesC:¥hoge¥SDPT3-4.0¥Solver¥Mexfun¥mexfun71C:¥hoge¥SDPT3-4.0¥Solver¥OldmfilesC:¥hoge¥SDPT3-4.0¥dimacsC:¥hoge¥SDPT3-4.0¥sdplibC:¥hoge¥sedumi-masterC:¥hoge¥sedumi-master¥conversionC:¥hoge¥sedumi-master¥docC:¥hoge¥sedumi-master¥examplesC:¥hoge¥sedumi-master¥o_win以下,省略
![Page 8: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/8.jpg)
YALMIP:インストール (3/4)
管理者権限があれば,起動時にパスを通すことが可能である.
たとえば,C:¥MATLAB_R2016a に MATLAB がインストール
されている場合,
addpath(genpath('C:¥hoge¥sedumi-master'))addpath(genpath('C:¥hoge¥SDPT3-4.0'))addpath(genpath('C:¥hoge¥yalmip'))
C:¥MATLAB_R2016a¥toolbox¥local
にあるファイル (matlabrc.m) の最下部に
を追加する.
![Page 9: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/9.jpg)
001 %MATLABRC Master startup M-file.002 % MATLABRC is automatically executed by MATLAB during startup.003 % It establishes the MATLAB path, sets the default figure size,004 % and sets a few uicontrol defaults.005 %
< 省 略 >
220 % Run deployment configuration file only in deployed mode.221 if( isdeployed && ~ismcc && exist('deployrc', 'file'))222 deployrc;223 end224225 addpath(genpath('C:¥hoge¥sedumi-master'))226 addpath(genpath('C:¥hoge¥SDPT3-4.0'))227 addpath(genpath('C:¥hoge¥yalmip'))
YALMIP:インストール (4/4)
matlabrc.m (MATLAB R2016a for Windows)
追加(SeDuMi, SDPT3,
YALMIP を使用)
![Page 10: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/10.jpg)
>> yalmiptest('sedumi')
< 省 略 >
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Test| Solution| Solver message|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Core functionalities| N/A| Successfully solved (YALMIP)|
| LP| Correct| Successfully solved (SeDuMi-1.3)|
| LP| Correct| Successfully solved (SeDuMi-1.3)|
| QP| Correct| Successfully solved (SeDuMi-1.3)|
| QP| Correct| Successfully solved (SeDuMi-1.3)|
| SOCP| Correct| Successfully solved (SeDuMi-1.3)|
| SOCP| Correct| Successfully solved (SeDuMi-1.3)|
| SOCP| Correct| Successfully solved (SeDuMi-1.3)|
| SDP| Correct| Successfully solved (SeDuMi-1.3)|
| SDP| Correct| Successfully solved (SeDuMi-1.3)|
| SDP| Correct| Successfully solved (SeDuMi-1.3)|
| SDP| Correct| Successfully solved (SeDuMi-1.3)|
| MAXDET| Correct| Successfully solved (SeDuMi-1.3)|
| MAXDET| Correct| Successfully solved (SeDuMi-1.3)|
| Infeasible LP| N/A| Infeasible problem (SeDuMi-1.3)|
| Infeasible QP| N/A| Infeasible problem (SeDuMi-1.3)|
| Infeasible SDP| N/A| Infeasible problem (SeDuMi-1.3)|
| Moment relaxation| Correct| Successfully solved (SeDuMi-1.3)|
| Sum-of-squares| Correct| Successfully solved (SeDuMi-1.3)|
| Bilinear SDP| N/A| Solver not applicable (sedumi)|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
YALMIP:動作確認 (1/3)
SeDuMi
![Page 11: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/11.jpg)
>> yalmiptest('sdpt3')
< 省 略 >
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Test| Solution| Solver message|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Core functionalities| N/A| Successfully solved (YALMIP)|
| LP| Correct| Successfully solved (SDPT3-4)|
| LP| Correct| Successfully solved (SDPT3-4)|
| QP| Correct| Successfully solved (SDPT3-4)|
| QP| Correct| Successfully solved (SDPT3-4)|
| SOCP| Correct| Successfully solved (SDPT3-4)|
| SOCP| Correct| Successfully solved (SDPT3-4)|
| SOCP| Correct| Successfully solved (SDPT3-4)|
| SDP| Correct| Successfully solved (SDPT3-4)|
| SDP| Correct| Successfully solved (SDPT3-4)|
| SDP| Correct| Successfully solved (SDPT3-4)|
| SDP| Correct| Successfully solved (SDPT3-4)|
| MAXDET| Correct| Successfully solved (SDPT3-4)|
| MAXDET| Correct| Successfully solved (SDPT3-4)|
| Infeasible LP| N/A| Infeasible problem (SDPT3-4)|
| Infeasible QP| N/A| Infeasible problem (SDPT3-4)|
| Infeasible SDP| N/A| Infeasible problem (SDPT3-4)|
| Moment relaxation| Correct| Successfully solved (SDPT3-4)|
| Sum-of-squares| Correct| Successfully solved (SDPT3-4)|
| Bilinear SDP| N/A| Solver not applicable (sdpt3)|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
YALMIP:動作確認 (2/3)
SDPT3
![Page 12: Windows OS における...001 %MATLABRC Master startup M-file. 002 % MATLABRC is automatically executed by MATLAB during startup. 003 % It establishes the MATLAB path, sets the default](https://reader033.vdocuments.pub/reader033/viewer/2022060706/60722d8ff02fc05c3a5e818b/html5/thumbnails/12.jpg)
>> yalmiptest('lmilab')
< 省 略 >
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Test| Solution| Solver message|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
| Core functionalities| N/A| Successfully solved (YALMIP)|
| LP| Correct| Successfully solved (LMILAB)|
| LP| Correct| Successfully solved (LMILAB)|
| QP| Correct| Successfully solved (LMILAB)|
| QP| Correct| Successfully solved (LMILAB)|
| SOCP| Correct| Successfully solved (LMILAB)|
| SOCP| N/A| Infeasible problem (LMILAB)|
| SOCP| N/A| Infeasible problem (LMILAB)|
| SDP| Correct| Successfully solved (LMILAB)|
| SDP| Correct| Successfully solved (LMILAB)|
| SDP| Correct| Successfully solved (LMILAB)|
| SDP| Correct| Successfully solved (LMILAB)|
| MAXDET| Correct| Successfully solved (LMILAB)|
| MAXDET| Correct| Successfully solved (LMILAB)|
| Infeasible LP| N/A| Infeasible problem (LMILAB)|
| Infeasible QP| N/A| Infeasible problem (LMILAB)|
| Infeasible SDP| N/A| Infeasible problem (LMILAB)|
| Moment relaxation| Correct| Successfully solved (LMILAB)|
| Sum-of-squares| N/A| Infeasible problem (LMILAB)|
| Bilinear SDP| N/A| Solver not applicable (lmilab)|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
YALMIP:動作確認 (3/3)
LMILAB (LMI-Lab)※ Robust Control Toolbox が必要