fprintf size without knowing the dimension

조회 수: 15 (최근 30일)
John
John 2017년 7월 14일
댓글: John 2017년 7월 14일
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일
You can just do
fprintf(' %s\n',num2str(size(array)));
HTH

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by