how to find specific .mat file

8 vues (au cours des 30 derniers jours)
Zhonghao Li
Zhonghao Li le 16 Juin 2018
Commenté : Zhonghao Li le 16 Juin 2018
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.

Réponse acceptée

Stephen23
Stephen23 le 16 Juin 2018

Plus de réponses (1)

Walter Roberson
Walter Roberson le 16 Juin 2018
>> which handel.mat
/Applications/MATLAB_R2018a.app/toolbox/matlab/audiovideo/handel.mat
  3 commentaires
Walter Roberson
Walter Roberson le 16 Juin 2018
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
Zhonghao Li
Zhonghao Li le 16 Juin 2018
oh,I get it,thanks a lot

Connectez-vous pour commenter.

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by