添加当前文件夹及其子文件夹到以及别而的文件夹到当前路径
来源:互联网 发布:淘宝转运到澳洲要多久 编辑:程序博客网 时间:2024/06/13 05:18
addpath(genpath(pwd)),代表当MATLAB搜素时,搜索范围包含当前文件夹中的子文件夹
addpath -Add folders to search path
Alternatives
As an alternative to the addpath function, use the Set Path dialog box.
Syntax
addpath('folderName1','folderName2','folderName3' ...)
addpath('folderName1','folderName2','folderName3' ... flag)
addpath folderName1 folderName2 folderName3 ... -flag
previous_path = addpath(...)
Description
addpath('folderName1','folderName2','folderName3' ...) adds the specified folders to the top of the search path. Use the full path name for each folder. Use genpath with addpath to add all subfolders of folderName. Use addpath statements in a startup.m file to modify the search path programmatically at startup.
addpath('folderName1','folderName2','folderName3' ... flag) adds the specified folders to either the top or bottom of the search path,or disables folder change detection on Windows, depending on the value of position.
Value of Flag
Result
'-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). Type help changenotification in the Command Window for more information.
addpath folderName1 folderName2 folderName3 ... -flag is the command syntax.
previous_path = addpath(...) configures the path using the inputs and returns the previous path setting.
Tips
If you use addpath within a subfunction, the path change persists after program control returns from the function. That is, the scope of the path change is global, rather than local to the subfunction in which you change it.
Examples
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
Add myfiles and its subfolders to the search path:
addpath(genpath('c:/matlab/myfiles'))
On Windows, Add myfiles to the top of the search path, disable folder change notification, and display the search path before addingmyfiles:
previous = addpath('c:/matlab/myfiles', '-frozen')
- 添加当前文件夹及其子文件夹到以及别而的文件夹到当前路径
- 添加当前文件夹及其子文件夹到路径 addpath matlab
- 添加当前文件夹及其子文件夹到路径 addpath matlab
- matlab添加当前文件夹及子文件夹到路径
- 获取当前文件夹及其子文件夹的所有文件名并且保存到数组中
- 剪切子文件夹下的文件到当前文件夹的bat文件
- 如何通过批处理将子文件夹内的文件移动到当前文件夹
- 如何通过批处理将子文件夹内的文件移动到当前文件夹
- 拷贝匹配的文件夹及其子文件夹到指定位置
- 列出当前文件夹及其子文件夹下所有文件名称
- ubuntu中拷贝文件到当前文件夹
- matlab将某文件夹及其全部子文件夹路径添加为搜索路径的方法
- 批外理 移动子文件夹下的文件到当前目录并删除子目录
- java复制当前项目的文件夹到D盘
- VS通过文件路径名查找到当前文件夹和当前文件名
- VC中得到当前文件夹的路径
- VC中得到当前文件夹的路径
- 获得当前文件夹路径的方法
- 黑马程序员--IOS基础第五天(C语言)
- 面向对象编程
- Python练习册0-9
- 1044. Shopping in Mars (25)
- MCU overview & architecture
- 添加当前文件夹及其子文件夹到以及别而的文件夹到当前路径
- poj 2942 Knights of the Round Table(补图的求取+双连通分量+奇环的判断)
- 黑马程序员--IOS基础第六天(C语言)
- NodeJs学习(一)
- 【BootStrap】初步教程
- Android 横竖屏切换时,当前activity界面的dialog消失的问题
- 【打CF,学算法——二星级】Codeforces Round #312 (Div. 2) A Lala Land and Apple Trees
- POJ 3536 Beer Refrigerator(水~)
- Jenkins(for mac)相关参数配置文件及位置说明