how to count row and column of a matrix

298 Ansichten (letzte 30 Tage)
eri
eri am 14 Dez. 2011
Kommentiert: Alexander am 20 Jan. 2025
if i have a big matrix and i don't know its size, how to find out its size? and how to save it as variable?

Akzeptierte Antwort

the cyclist
the cyclist am 14 Dez. 2011
[m,n] = size(A)
  4 Kommentare
Ali Faragallah
Ali Faragallah am 14 Mär. 2021
thank you
Alexander
Alexander am 20 Jan. 2025
thanks

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (2)

Md. Kawsar Ahmed Asif
Md. Kawsar Ahmed Asif am 13 Dez. 2017
Bearbeitet: Md. Kawsar Ahmed Asif am 13 Dez. 2017
[rownum,colnum]=size(A)
Where 'A' is a mxn matrix.

Anurag Pratap Singh
Anurag Pratap Singh am 25 Jun. 2020
Hii Eri
To know the size of a matrix you can use the size function and pass your matrix in it
[NumRows NumCols]=size(your_matrix);
The first output is the Number of rows and second the number of columns
Thank you

Kategorien

Mehr zu Creating and Concatenating Matrices 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