how to extract a number from file name in folder
1 次查看(过去 30 天)
显示 更早的评论
hi,
i want to extract a part of a file name in a folder to use for a loop to automate a process,
i have in a folder files in the pattern of
time_vector@field=yy.xxx@date=dd_mm_yy
i want to extract yy.xxx to use for a loop:
for ii = min(yy.xxx):0.1:max(yy.xxx)
i guess that i need to put all the files names to a variable or a table but i dont figured how.
1 个评论
Rik
2019-1-15
Did you try the dir function? You can use it to retrieve a list of file and folder names, so that is probably what you need.
回答(2 个)
KSSV
2019-1-15
Read about dir . This will give you all the file spresent int he foder. YOu can give extension and extract only those files.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!