From a vector q={Gamma,x,y}
, I would like to create the following corresponding list : qn={1,2,3}
.
Other example, if I have q={Gamma,x,y,theta}
, I would like to retrieve qn={1,2,3,4}
.
Thank you for your help.
Is there a better way than Table[i, {i, 1, Length[q]}]
?
Thank you
Range[Length[q]]
$\endgroup$ – Jason B. Nov 12 '15 at 10:26{Gamma, x, x, Gamma}
? $\endgroup$ – Kuba♦ Nov 12 '15 at 10:44