What does '* *' mean in matlab?

59 次查看(过去 30 天)
Victoria Helm
Victoria Helm 2020-6-16
编辑: Stephen23 2020-6-16
For example:
D = dir(fullfile(logfilepath,'**','*.log'))

回答(1 个)

Stephen23
Stephen23 2020-6-16
编辑:Stephen23 2020-6-16
The double asterisk tells dir to recursively search the provided path, the documentation explains it with "and dir **/*.txt lists all files with a txt extension zero or more folders under the current folder. Characters next to a ** wildcard must be file separators." This feature was introduced in R2016b, so if you use an earlier version you will have to use an alternative, e.g. one of these:

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by