how to count row and column of a matrix

346 ビュー (過去 30 日間)
eri
eri 2011 年 12 月 14 日
コメント済み: Alexander 2025 年 1 月 20 日
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?

採用された回答

the cyclist
the cyclist 2011 年 12 月 14 日
[m,n] = size(A)
  4 件のコメント
Ali Faragallah
Ali Faragallah 2021 年 3 月 14 日
thank you
Alexander
Alexander 2025 年 1 月 20 日
thanks

サインインしてコメントする。

その他の回答 (2 件)

Md. Kawsar Ahmed Asif
Md. Kawsar Ahmed Asif 2017 年 12 月 13 日
編集済み: Md. Kawsar Ahmed Asif 2017 年 12 月 13 日
[rownum,colnum]=size(A)
Where 'A' is a mxn matrix.

Anurag Pratap Singh
Anurag Pratap Singh 2020 年 6 月 25 日
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

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by