matlab里path,Matlab设置永久path

1. 加入文件夹搜索路径 — addpath

ddpath('folderName1','folderName2','folderName3' ...)

addpath('folderName1','folderName2','folderName3' ... flag)

addpath folderName1 folderName2 folderName3 ... -flag)

previous_path = addpath(...)

这里的flag为

‘-begin’ :Add specified folders to the top of the search path.

‘-end’ :Add specified folders to the bottom of the search path.

‘-frozen’ :Disables change detection for folders you add to the path, which conserves Windows change notification resources (Windows only). Typehelp changenotification in the Command Window for more information.

例子:

Add c:/matlab/myfiles to the top of the search path:

addpath('c:/matlab/myfiles')

Add c:/matlab/myfiles to the end of the search path:

addpath c:/matlab/myfiles -end

2. 加入文件夹及其下子文件夹 —addpath(genpath(‘c:/matlab/myfiles’))

如:Add myfiles and its subfolders to the search path:

On Windows, Add myfiles to the top of the search path, disable folder change notification, and display the search path before adding myfiles:

previous = addpath('c:/matlab/myfiles', '-frozen')

3. 去除文件夹搜索路径 rmpath

rmpath(‘folderName’) removes the specified folder from the search path . Use the full path forfolderName.

rmpath folderNameis the command form of the syntax.

4. 永久添加到搜索路径

pathtool/菜单: File -> Set Path

修改Matlab 相关配置文件pathdef.m % 位于 $MATLAB\toolbox\local\

先使用 path 或addpath命令将指定的目录加入到当前搜索路径中,然后使用 saveptah命令将当前搜索路径写入pathdef.m

Like this:

Like Loading...

Related

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值