how to count row and column of a matrix
451 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Plus de réponses (2)
Md. Kawsar Ahmed Asif
le 13 Déc 2017
Modifié(e) : Md. Kawsar Ahmed Asif
le 13 Déc 2017
[rownum,colnum]=size(A)
Where 'A' is a mxn matrix.
0 commentaires
Anurag Pratap Singh
le 25 Juin 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
0 commentaires
Voir également
Catégories
En savoir plus sur Matrices and Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!