I have an object with 10 points. I have created a vector:

DOF={0,1,2,3,4,5,6,7,8,9}

Further in my notebook I have solved to find:

DOFS={0,4,8} - these numbers will be different

I would now like to reorder these so that DOFS comes first and then the rest follow in numerical order.

realigned={0,4,8,1,2,3,5,6,7,9}

right now I have:

Code:realigned = Table[0, {i, 10}, {j, 1}]; count = 1 For[i = 1, i <= 3, i++, realigned[[count]] = DOFS[[i]]; count = count + 1]; For[i = 1, i <= 10, i++, If[realigned[i] == DOFS[[i]], Continue[]]; realigned[[count]] = i; count = count + 1]