matlab - How to sort an array based on the values of the elements? -


a = [125,313,275,120] b = [277,715,823,450] 

i have 2 arrays , want sort , want apply same ordering b, meaning want have : know can use sort (a), don't know how b1.

a1 = [120,125,275,313] b1 = [450,277,823,715] 

thank you.

try:

[a1, i] = sort(a); b1 = b(i); 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -