How can I use MATLAB to find the location of a file or folder?

17 次查看(过去 30 天)
I want to add a function and a folder to my MATLAB path, however, I do not know where they are located. Can I use MATLAB to find the location of this file and folder?

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2025-2-3
You can use the Find Files Tool in MATLAB, which is accessed by clicking the Find Files button in the File section of the Home tab. This searches the contents within a selected folder for a given file or folder name, and if you click the include subfolder button, it will search through the subfolders of the selected folder as well.
You can conduct an advanced search for files by using the Find Files tool to:
  • Search for specific text in file names and within files
  • Include or exclude specified file types from your search
  • Search in specified folders
  • Exclude large files from your search
For detailed instructions on using the Find Files tool, execute the following command in the MATLAB R2020b command window to access the release-specific documentation:
>> web(fullfile(docroot, 'matlab/matlab_env/finding-files-and-folders.html'))
Please follow the link below to search for the required information regarding the current release:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by