Creating an index vector

2 visualizaciones (últimos 30 días)
Mateus Pianowski
Mateus Pianowski el 26 de Nov. de 2017
Comentada: Image Analyst el 26 de Nov. de 2017
I was able to sort the stats variable in descending order but I have no idea of how to store the index vector. Here is the question:
3)Sort vector stats in descending order, and store the sorted vector in variable DVOA, and index vector in variable ind.
4)Use index vector ind to rearrange the order of both variables team and name to match the order the sorted DVOA vector, and store rearranged teams in variable Team, and rearranged names in variable Name

Respuesta aceptada

Walter Roberson
Walter Roberson el 26 de Nov. de 2017
[DVOA, ind] = sort(....)
  1 comentario
Image Analyst
Image Analyst el 26 de Nov. de 2017
Team = Team(ind); % Sort Team in the very same order.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by