Question: Distributing values on a list or vector

I want to build a list or vector out of 2 vectors containing values and 2 lists containing the order in the total list (or vecotr), I was wondering if there is a very simple way to do this instead of using loops?

NbNode:=6;
These are values:
U:=<1,2,2,3>;
UElim:=<0,5>;

And these are orders:
Elim:=[2,4];
ListEqn:=[seq( i, i=1..NbNode )]:
ListEqn:=subsop(seq(i=NULL, i in Elim), ListEqn);

The final result should be:

Utot=[1,0,2,5,2,3]

 

Please Wait...