read number from file name leaving special characters

2 ビュー (過去 30 日間)
Oindri
Oindri 2018 年 3 月 14 日
コメント済み: KSSV 2018 年 3 月 14 日
data_3dsar_pass1_az001_HH.mat
This is the filename. I need to read in the serial number at the end of the string. I have 360 such files starting from 001 to 360. how do i do it.

採用された回答

KSSV
KSSV 2018 年 3 月 14 日
編集済み: KSSV 2018 年 3 月 14 日
matfiles = dir('*.mat') ; % you are in the folder of mat files
N = length(matfiles) ; % total number of files
% loop for each file
for i = 1:N
thisfile = matfiles(i).name
% do what you want
end
  4 件のコメント
Oindri
Oindri 2018 年 3 月 14 日
Thanks. Anyways, I had to make some modifications.
KSSV
KSSV 2018 年 3 月 14 日
fine..I hope your problem is solved....

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by