how to find specific .mat file
8 次查看(过去 30 天)
显示 更早的评论
If I know the name of the mat file,can I find it in toolbox?But I do not know which category it is and is seems only functions can be found there.
0 个评论
采纳的回答
更多回答(1 个)
Walter Roberson
2018-6-16
>> which handel.mat
/Applications/MATLAB_R2018a.app/toolbox/matlab/audiovideo/handel.mat
3 个评论
Walter Roberson
2018-6-16
You would name the .mat file you wanted to find instead of handel.mat . For example,
which flu.mat
In order for which to be able to find the .mat file, it must be somewhere on the MATLAB path.
If the file is in a private directory or inside a package, then the directory is probably not directly on the MATLAB path. In such a case you case use the -all flag of which:
>> which new_btn.mat
'new_btn.mat' not found.
>> which -all new_btn.mat
/Applications/MATLAB_R2018a.app/toolbox/stateflow/stateflow/private/new_btn.mat
However, not all files provided with MATLAB are on the MATLAB path. For example some of the files related to examples are not on the path by default, and when you use open_example then they are copied from their location to a local directory for you to experiment with. You might need to use a system tool to find the file
>> which -all flames.mat
'flames.mat' not found.
>> !find /Applications/MATLAB_R2018a.app -name flames.mat -print
/Applications/MATLAB_R2018a.app/extern/examples/compiler/flames.mat
In MS Windows, the command would involve "dir" with the "/s" flag, such as
!cd C:\; dir /s flames.mat
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!