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.
  • 9
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值