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

2 views (last 30 days)
a=[1 1 1;1 1 1;1 1 1;1 1 1]
no of rows=4
col=3

Accepted Answer

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

More Answers (1)

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

Community Treasure Hunt

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

Start Hunting!