Create vector from row's table in opposite order

4 vues (au cours des 30 derniers jours)
matteo avanzi
matteo avanzi le 2 Nov 2017
Commenté : matteo avanzi le 2 Nov 2017
I want to create a vector from a row's table in a way that the last value of the raw will be the first of the vector and viceversa for the first value. For example the 5th row of my table is [1 0.606617375231054 0.388555555555556 0.175210727969349], i need to create a vector in the opposite order like [0.175257731958763 0.390000000000000 0.603960396039604 1], because i need the values in a growing order not descendent.
thanks

Réponse acceptée

KL
KL le 2 Nov 2017
Modifié(e) : KL le 2 Nov 2017
fliplr(yourtable{yourRow,:})
if you want to sort them instead of just flipping them like above, you should rather use,
sort(yourtable{yourRow,:})

Plus de réponses (0)

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by