fprintf size without knowing the dimension
조회 수: 15 (최근 30일)
이전 댓글 표시
How can I print the size of the array in one row without prior-knowing the dimension of the array?
fprintf(' %d\n',size(array));
How many %d to put there? or how to do it right?
댓글 수: 1
Geoff Hayes
2017년 7월 14일
John - you asked this already at https://www.mathworks.com/matlabcentral/answers/348261-how-to-print-size-of-array.
채택된 답변
Honglei Chen
2017년 7월 14일
편집: Honglei Chen
2017년 7월 14일
You can just do
fprintf(' %s\n',num2str(size(array)));
HTH
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!