What does this colon mean here?
Ältere Kommentare anzeigen
[a_sorted, a_order] = sort(A);
newB = B(a_order,:);
This is a few commands that I found on here and I am unsure of what the colon in the second line means. I am trying to sort a vector based on how I sorted another vector and I stumbled across the code above. does this accomplish what I am trying to do, and how do I use the colon in this case for future reference?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Shifting and Sorting Matrices finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!