# assign different values to different entries of a list [closed]

I would like to assign different values for x in the following list, in other words, say, x=6 in the first entries assign , x=6.1 in the 2nd, x=6.2 in the 3rd and so on. How can this work be done?

{A1 x , A2 x^2 , A3 x^3}


Thanks.

## closed as unclear what you're asking by m_goldberg, Simon Woods, corey979, MarcoB, YoungFeb 11 '17 at 17:57

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• This is a very poorly posed question. 1) " in the following list"; what following list -- I see no list. 2) What are A1, A2, and A3? I don't know how you expect to get answer. We are not psychics. – m_goldberg Feb 11 '17 at 10:18

I think you want to generate lists for different values of x.

Assuming A1, A2, and A3 are constants.

list = {A1 x, A2 x^2, A3 x^3};
listDiffXValues = list /. {x -> #} & /@ {6, 6.1, 6.2}
(*{{6 A1, 36 A2, 216 A3}, {6.1 A1, 37.21 A2, 226.981 A3},
{6.2 A1, 38.44 A2, 238.328 A3}}*)


I understood the question differently. I assumed you wanted to assign to each x in the first list a corresponding value from the other list in the order they show up? if so, One way could be

ClearAll[x]
list = {A1 x, A2 x^2, A3 x^3};
values = {6, 6.1, 6.2};
Inner[Function[{r1, r2}, r1 /. x -> r2], list, values, List]


• Excellent. very thanks. – PhysicsExams Feb 11 '17 at 17:48