how to count row and column of a matrix
433 次查看(过去 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 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!