Identify the file number from the folder

3 ビュー (過去 30 日間)
Turbulence Analysis
Turbulence Analysis 2021 年 1 月 28 日
Hi,
I have set of .bmp files saved inside the folder, it's saved in the seqeunce as follows R00009, R00089, R00198 ... ... R09180. I need to extract the file number and save it in matirx, for e.g. in R00089, I need to get only 89.. Is there a way to do this...??

採用された回答

Stephen23
Stephen23 2021 年 1 月 28 日
編集済み: Stephen23 2021 年 1 月 28 日
D = 'absolute or relative path to where the files are saved';
S = dir(fullfile(D,'R*.bmp'));
V = sscanf([S.name],'R%fbmp')
  1 件のコメント
Turbulence Analysis
Turbulence Analysis 2021 年 1 月 29 日
Thanks a lot, Stephen.. It's working perfectly.. !!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by