how to find specific .mat file
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zhonghao Li
el 16 de Jun. de 2018
Comentada: Zhonghao Li
el 16 de Jun. de 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.
0 comentarios
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 16 de Jun. de 2018
>> which handel.mat
/Applications/MATLAB_R2018a.app/toolbox/matlab/audiovideo/handel.mat
3 comentarios
Walter Roberson
el 16 de Jun. de 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
Ver también
Categorías
Más información sobre File Operations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!