I have an array of elements and want to assign each element a specific value from a vector, at the same time I need the function ni[i] for the ith element of the list. I tried this, but it doesn't work:
Clear[nn, ni, m];
pop = {191202, 29234};
m = 2;
nn = Array[ni, m];
ni[i_] := pop[[i]]
ni[i]
During evaluation of In[834]:= Part::pkspec1: The expression i cannot
be used as a part specification. >>
Out[839]= {191202, 29234}[[i]]