getting the variable size value

2 Ansichten (letzte 30 Tage)
ramakrishna bathini
ramakrishna bathini am 14 Jun. 2011
I have a variable of size x*y .what matlab command is used to get the x value.

Akzeptierte Antwort

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

Weitere Antworten (1)

Ned Gulley
Ned Gulley am 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 Kommentar
ramakrishna bathini
ramakrishna bathini am 14 Jun. 2011
thanks for the reply a=size(X,1) is the command i was looking for...

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by