how do I count number of folder?

I do know how to count the number of files within the folder like this,
but is their way to file the number of folder inside the certain folder? (not file)

 採用された回答

José-Luis
José-Luis 2014 年 10 月 7 日

0 投票

all_files = dir;
all_dir = all_files([all_files(:).isdir]);
num_dir = numel(all_dir);

1 件のコメント

YJ
YJ 2014 年 10 月 7 日
thank you!!

サインインしてコメントする。

その他の回答 (1 件)

カテゴリ

ヘルプ センター および File ExchangeFile Operations についてさらに検索

タグ

質問済み:

YJ
2014 年 10 月 7 日

回答済み:

2014 年 10 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by