How rename files with loop
21 次查看(过去 30 天)
显示 更早的评论
Hello I constructed a loop with witch I created one file per iteration :
example :
subject = {'1' '2' '3'....etc};
for i = subject
with_my_procedure_I_created_myfile = A
end
I would like in each iteration that myfile "A" can be rename by :
A1 for the first iteration
A2 for the second
A3 for the third ... etc
How can I do ???
0 个评论
回答(2 个)
Image Analyst
2014-5-5
Use sprintf() like the first code block in the FAQ shows you: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
In the loop, create your input and output filenames, then use movefile() to do the renaming .
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!