How can I sort vector according to its index?

Hello every body
I have a problem,
I would like to sort vector
vect that contain
vect = [3 1 3 4]
each value in the vector vect has its index like
ind =[ 1 2 3 4]
so, I want sort the vector vect in descending order with keeping its index correctely
like that
vect =[ 4 3 3 1]
ind = [ 4 1 3 2]
How Can I do that, please help me!
Thank you.

Antworten (1)

Kategorien

Mehr zu SimEvents finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2017a

Tags

Gefragt:

am 13 Sep. 2021

Beantwortet:

am 13 Sep. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by