Parsing file names and converting to numbers

조회 수: 1 (최근 30일)
thiirane
thiirane 2014년 3월 15일
댓글: thiirane 2014년 3월 15일
Hello,
I have a series of bitmap image files each with a velocity as the first 5 characters in the filename (see attached). I seem to be able to isolate the 15.36 from the first file but when I put into a loop in the editor it doesn't like that. Is there a way to parse a filename based on position and write the strings to a numeric variable?
thanks

채택된 답변

Walter Roberson
Walter Roberson 2014년 3월 15일
str2double(filename(1:5))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by