how to count row and column of a matrix
조회 수: 854 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
채택된 답변
추가 답변 (2개)
Md. Kawsar Ahmed Asif
2017년 12월 13일
편집: Md. Kawsar Ahmed Asif
2017년 12월 13일
[rownum,colnum]=size(A)
Where 'A' is a mxn matrix.
댓글 수: 0
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!