I would like to create an array f containing n indices. The label of those indices is stored in a liste of length n, let's call it "list".
So I would like to have something like :
{f[list[[0]]], f[list[[1]],...}
The point is to affect the f[liste[[i]]] to some values after.
I tried to make a table, but the problem is that the indices cannot be a list from what I have seen (in the sense that they must be regularly spaced).
I also tried to use the array function but I have the same problem, I cannot specify the indices as being a list, it must be a regular spacing.
How can I do it ?
Table[f[i],{i, list}]
? $\endgroup$list[[0]]
is not valid (it refers to the head, which isList
). $\endgroup$f /@ list
would work. $\endgroup$