fprintf size without knowing the dimension
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Geoff Hayes
am 14 Jul. 2017
John - you asked this already at https://www.mathworks.com/matlabcentral/answers/348261-how-to-print-size-of-array.
Akzeptierte Antwort
Honglei Chen
am 14 Jul. 2017
Bearbeitet: Honglei Chen
am 14 Jul. 2017
You can just do
fprintf(' %s\n',num2str(size(array)));
HTH
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!