Identify the file number from the folder

6 次查看(过去 30 天)
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')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by