How to convert fprintf from single row to multiple rows?
Show older comments
Hi! I just started using Matlab a couple of days ago. How can I convert this single row into multiple rows?
Accepted Answer
More Answers (1)
I assume you want to show each numeric value in a new line. To do that, add a new line control character where you want to insert a new line,
fprintf('%11.5f\n%11.5f\n%11.5f\n%11.5f\n%11.5f\n', rand(1,6))
6 Comments
Christoppe
on 25 Jun 2022
Christoppe
on 25 Jun 2022
Christoppe
on 25 Jun 2022
Adam Danz
on 25 Jun 2022
Please provide the inputs the user should enter.
Also, please describe again what the problem is because it's still not entirely clear.
Christoppe
on 25 Jun 2022
Christoppe
on 25 Jun 2022
Categories
Find more on Scripts in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!