How do I create a new line after a loop function gives output
이전 댓글 표시
I have a loop that makes the same calculation multiple times based on my input. But when it gives me the output (some number) it immediately types the input prompt immediately after the number

I want it to output the prompt on a new line but when I try newline or sprintf('\r') it types text

How do I make it start the prompt from each run through the loop start on a new line without it typing a bunch of extra text? I tried using a “;” after but that changes it back to the first picture
댓글 수: 2
Voss
2021년 12월 23일
Can you share the actual code you are using? At least the call to input() and the relevant parts of the loop. I'm unable to reproduce the behavior you describe.
Hank Gunderson
2021년 12월 23일
편집: Hank Gunderson
2021년 12월 23일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!