MATLAB Answers

What does '* *' mean in matlab?

10 views (last 30 days)
Victoria Helm
Victoria Helm on 16 Jun 2020
Edited: Stephen Cobeldick on 16 Jun 2020
For example:
D = dir(fullfile(logfilepath,'**','*.log'))

  0 Comments

Sign in to comment.

Answers (1)

Stephen Cobeldick
Stephen Cobeldick on 16 Jun 2020
Edited: Stephen Cobeldick on 16 Jun 2020
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:

  0 Comments

Sign in to comment.


Translated by