for take long time

2 visualizaciones (últimos 30 días)
huda nawaf
huda nawaf el 19 de Nov. de 2011
hi,
I have vector of indices, I should look for indices in large vector of values, then arrange the values depend on their indices in that vector and place it in new vector.
I hope to use a command instead of for for searching , because it is taking long time.
index=[3 2 1 100......................] very long
values=[10 9 2 .....................]
new=[2 9 10.........................]
is there such command?
thanks
  2 comentarios
Robert Cumming
Robert Cumming el 19 de Nov. de 2011
what have you tried?
huda nawaf
huda nawaf el 19 de Nov. de 2011
thanks , the problem is solved by walter

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Nov. de 2011
new = values(index);

Más respuestas (1)

huda nawaf
huda nawaf el 19 de Nov. de 2011
many many thanks for u and for matlab
you solved big problem

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by