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!