Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matrix to list mathematica

  1. Sep 21, 2014 #1
    Hi everyone:

    I would like to join all elements of on matrix into just one list:

    matrix =
    1 2 3
    4 5 6
    7 8 9


    list = {1,2,3,4,5,6,7,8,9}

    Anyone has a solution for this?

  2. jcsd
  3. Sep 21, 2014 #2
    list = Flatten[matrix]
  4. Sep 21, 2014 #3
    OMG!!! Thanks, such a simple solution. I tried a lot of things, such as "For" and "Join", but with no easy result.

    Thank you very much!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Matrix to list mathematica
  1. Lists in mathematica (Replies: 4)