related to the fprintf
1 次查看(过去 30 天)
显示 更早的评论
SCRW;NAME;SCRW_1
SCRW;NAME;SCRW_2
SCRW;NAME;SCRW_3
SCRW;NAME;SCRW_4
i need a text file exactly this way so how can i write the code with. it should execute automatically with the number of shoes
0 个评论
回答(1 个)
Walter Roberson
2022-7-5
number_of_shoes = 4;
for shoe_number = 1 : number_of_shoes
filename = sprintf('SCRW;NAME;SCRW_%d', shoe_number)
end
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!