is there a function that calculates the no. of rows or cols

1 次查看(过去 30 天)
a=[1 1 1;1 1 1;1 1 1;1 1 1]
no of rows=4
col=3

采纳的回答

sixwwwwww
sixwwwwww 2013-12-2
Dear mary, use
[row, col] = size(a)

更多回答(1 个)

Sean de Wolski
Sean de Wolski 2013-12-2
[r,c] = size(a);
For more info:
doc size

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by