for loop

1 次查看(过去 30 天)
Baba
Baba 2011-11-14
i'd like to create 10 folders, named folder_1, folder_2....folder_10. Please help me fix the syntax.
for i=1:10
mkdir ('folder_',i) how do I properly use the i index in this case?
end

采纳的回答

Grzegorz Knor
Grzegorz Knor 2011-11-14
for i=1:10
mkdir (sprintf('folder_%i',i))
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by