getting the variable size value

2 views (last 30 days)
I have a variable of size x*y .what matlab command is used to get the x value.

Accepted Answer

Alex Taylor
Alex Taylor on 14 Jun 2011
[R,C] = size(A);
doc size

More Answers (1)

Ned Gulley
Ned Gulley on 14 Jun 2011
To find the size, use size.
[m,n] = size(X)
m = size(X,dim)
So to find the number of rows, you can say
numRows = size(X,1)
  1 Comment
ramakrishna bathini
ramakrishna bathini on 14 Jun 2011
thanks for the reply a=size(X,1) is the command i was looking for...

Sign in to comment.


Community Treasure Hunt

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

Start Hunting!