fprintf size without knowing the dimension

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?

 채택된 답변

Honglei Chen
Honglei Chen 2017년 7월 14일
편집: Honglei Chen 2017년 7월 14일

0 개 추천

You can just do
fprintf(' %s\n',num2str(size(array)));
HTH

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

제품

태그

질문:

2017년 7월 14일

댓글:

2017년 7월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by