fprintf size without knowing the dimension

15 visualizaciones (últimos 30 días)
John
John el 14 de Jul. de 2017
Comentada: John el 14 de Jul. de 2017
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?

Respuesta aceptada

Honglei Chen
Honglei Chen el 14 de Jul. de 2017
Editada: Honglei Chen el 14 de Jul. de 2017
You can just do
fprintf(' %s\n',num2str(size(array)));
HTH

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by