Hello.

How to convert two lists like these:

a={2,3,4,5}

b={4,5,6,7}

to a set of data like this:

data={{2,4},{3,5},{4,6},{5,7}}

How to do this? :/

thanks.

Printable View

- January 3rd 2011, 12:00 AMrousfvMathmatica data for regression
Hello.

How to convert two lists like these:

a={2,3,4,5}

b={4,5,6,7}

to a set of data like this:

data={{2,4},{3,5},{4,6},{5,7}}

How to do this? :/

thanks. - January 3rd 2011, 04:46 AMAckbeet
If you've already assigned the variables a and b, try this command:

Code:`Thread[a,b]`

Code:`Thread[{2,3,4,5},{4,5,6,7}]`

- January 3rd 2011, 05:31 AMrousfv
- January 3rd 2011, 05:32 AMAckbeet
Yeah, you're right. You'd have to include those. Anyway. You're welcome. Have a good one!