Why is a statement like "sortrows(A)(2:4)" "invalid array indexing" and how can I circumvent adding an extra line of code to make it work?
Afficher commentaires plus anciens
I could write:
sorted = sortrows(A)
sorted(2:4)
However this seems clumsy and unnecessarily long to me. How can I compress it down to one statement?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Shifting and Sorting Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!