indexing entry of a matrix result
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Viesturs Veckalns
le 16 Oct 2017
Modifié(e) : Viesturs Veckalns
le 16 Oct 2017
A is an MxN matrix. To get the number of columns of A I can do the following:
s = size(A);
ncol = s(2);
How can I construct a direct expression avoiding the intermediary variable s?
0 commentaires
Réponse acceptée
Cedric
le 16 Oct 2017
[nRows, nCols] = size( A ) ;
if you don't need nRows:
[~, nCols] = size( A ) ;
0 commentaires
Plus de réponses (0)
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!