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!