Identify the file number from the folder

조회 수: 1 (최근 30일)
Turbulence Analysis
Turbulence Analysis 2021년 1월 28일
댓글: Turbulence Analysis 2021년 1월 29일
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 CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by