Picking files according to file names

1 回表示 (過去 30 日間)
TTA
TTA 2019 年 9 月 16 日
コメント済み: TTA 2019 年 9 月 16 日
Hi,
I have these filenames in netcdf listed below
atmPrf_C004.2006.112.03.55.G20_2013.3520_nc
atmPrf_C004.2006.112.05.27.G28_2013.3520_nc
atmPrf_C004.2006.112.05.36.G24_2013.3520_nc
atmPrf_C004.2006.112.05.38.G17_2013.3520_nc
atmPrf_C004.2006.112.07.08.G02_2013.3520_nc
the numbers after 112 is the time. I want to pick these files according to their time in a loop using the filenames. Is it possible?
Please help me if it is possible
Attached are some files as example.

採用された回答

Rik
Rik 2019 年 9 月 16 日
Use the dir function to generate a list of files, then parse the file names in a loop and continue to read the relevant files.
  3 件のコメント
Rik
Rik 2019 年 9 月 16 日
You mean you want to read them in a specific order? Then you could parse the file names first and then make a second loop to read the actual files.
TTA
TTA 2019 年 9 月 16 日
ok thanks so much

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeString Parsing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by