Results 1 to 4 of 4

Math Help - Mathmatica data for regression

  1. #1
    Newbie
    Joined
    Jul 2010
    Posts
    16

    Mathmatica 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.
    Last edited by rousfv; January 3rd 2011 at 01:14 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    If you've already assigned the variables a and b, try this command:

    Code:
    Thread[a,b]
    Otherwise, go with

    Code:
    Thread[{2,3,4,5},{4,5,6,7}]
    Cheers.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jul 2010
    Posts
    16
    Quote Originally Posted by Ackbeet View Post
    If you've already assigned the variables a and b, try this command:

    Code:
    Thread[a,b]
    Otherwise, go with

    Code:
    Thread[{2,3,4,5},{4,5,6,7}]
    Cheers.
    Thanks for mentioning "Thread"!!

    I had to add a pair of brackets Thread[{a,b}]
    Follow Math Help Forum on Facebook and Google+

  4. #4
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Yeah, you're right. You'd have to include those. Anyway. You're welcome. Have a good one!
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Logistic Regression with corelated data
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: March 30th 2011, 09:37 AM
  2. Which regression should I use for this data?
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: February 15th 2011, 12:17 AM
  3. Mathmatica Paragraph Formating
    Posted in the Math Software Forum
    Replies: 0
    Last Post: November 20th 2010, 07:21 PM
  4. Mathmatica help, Riemann Sums
    Posted in the Math Software Forum
    Replies: 0
    Last Post: December 2nd 2009, 02:12 PM
  5. Data Management-non-linear regression
    Posted in the Advanced Statistics Forum
    Replies: 5
    Last Post: April 30th 2008, 12:00 PM

Search Tags


/mathhelpforum @mathhelpforum