Matlab中MatPower模块的安装流程

Matlab中MatPower模块的安装流程


Matpower的安装比较简单
第1步:到官网(https://matpower.org/)下载最新版Matpower文件,并解压缩,找到含有install_matpower.m的matpower文件夹

第2步:找到Matlab的安装目录下的toolbox文件夹。将第一步中的matpower文件夹拷贝至toolbox文件夹下(进行这步之前确保之前没有安装过matpower)

第3步:将matlab的工作区切换到刚才拷贝到toolbox中的matpower文件夹中。

第4步:输入install_matpower,回车

第5步:系统提示

MATPOWER Installation Options:

   1. Do NOT modify the MATLAB path
          (just generate the required ADDPATH commands)
   2. DO modify the MATLAB path, but only temporarily
          (you will have to do it again next time you run MATLAB)
   3. DO modify the MATLAB path, and SAVE the updated path
          (so you will not have to do it again next time you run MATLAB)

Please enter your selection [1, 2, 3] (default = 1) :

输入1后,
系统提示

Use the following command to add MATPOWER to your MATLAB path:

addpath( ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\lib', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\lib\t', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\data', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\mips\lib', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\mips\lib\t', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\most\lib', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\most\lib\t', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\mptest\lib', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\mptest\lib\t', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\maxloadlim', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\maxloadlim\tests', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\maxloadlim\examples', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\misc', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\reduction', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\sdp_pf', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\se', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\smartmarket', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\state_estimator', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\syngrid\lib', ...
    'D:\Program Files\MATLAB\R2019b\toolbox\matpower7.0\extras\syngrid\lib\t', ...
    '-end' ); 

Would you like to save this command to a file? [Y or N] (default = N) :```

输入N,回车后
系统提示


-------------------------------------------------------------------

Once you have added the required directories to your MATLAB path
MATPOWER will be installed and ready to use.

You may want to begin by typing: mpver
to see the list of installed MATPOWER related software versions.

Or to run the MATPOWER test suite to ensure everything is
working correctly, type: test_matpower```

第6步:添加路径
复制 addpath(…一直到’-end’);
将复制的代码直接在matlab命令行下粘贴运行一遍,即可完成安装。

第7步:检验是否安装成功
输入test_matpower
如果成功,会出现如下字样

All tests successful (9142 passed, 884 skipped of 10026)
Elapsed time 76.34 seconds.

你可能感兴趣的:(matlab)