# How to set the values into some variables from different lists [closed]

I have a list of Values and a list of variables. I want to set the Values into Variables.

Assume the following code:

Values = {{1, 2}, {3, 4}, {5, 6}};
VariableS = {{x1, x2}, {x3, x4}, {x5, x6}};

VariableS[[1]] = Values[[1]];

FIntegrate = Integrate[f[x], {x, x1, x2}]


I want to use {x1, x2}={1, 2} and get x1=1 and x2=2 and finally caculate the definite IntegralFIntegrate .But I can not set the x1=1 and x2=2.

How can I to do that ?

-

## closed as off-topic by Artes, Verbeia♦Apr 15 at 12:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Artes, Verbeia
If this question can be reworded to fit the rules in the help center, please edit the question.

You can do that this way:

Values = {{1, 2}, {3, 4}, {5, 6}};
VariableS = {{x1, x2}, {x3, x4}, {x5, x6}};


 Cos[1] - Cos[2]

Your way is not working because VariableS[[1]] = Values[[1]]; sets the value of the first element of VariableS not the symbol names stored there.