Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

for take long time

Asked by huda nawaf

huda nawaf

on 19 Nov 2011
Accepted Answer by Walter Roberson

Walter Roberson

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 Comments

Robert Cumming

Robert Cumming

on 19 Nov 2011

what have you tried?

huda nawaf

huda nawaf

on 19 Nov 2011

thanks , the problem is solved by walter

huda nawaf

huda nawaf

Tags

Products

No products are associated with this question.

2 Answers

Answer by Walter Roberson

Walter Roberson

on 19 Nov 2011
Accepted answer
new = values(index);

0 Comments

Walter Roberson

Walter Roberson

Answer by huda nawaf

huda nawaf

on 19 Nov 2011

many many thanks for u and for matlab

you solved big problem

0 Comments

huda nawaf

huda nawaf

Contact us