How can i get multiple values in fprintf?
1 次查看(过去 30 天)
显示 更早的评论
So i have 'n' lots of integers every time I run the script. My code displays my fprintf n times...
fprintf('I have numbers: %d \n',numbers)
Is there a way to display all the 'n' numbers in the same line rather than repeating?
So I have if n=4
I have numbers: 1
I have numbers: 2
I have numbers: 3
I have numbers: 4
and I want:
I have numbers: 1,2,3,4
If I knew n i could put multiple %d 's in the fprintf.... but my n changes every time...
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!