Re: How To Break Long List to m-by-n MatrixForm
- To: mathgroup at smc.vnet.net
- Subject: [mg119044] Re: How To Break Long List to m-by-n MatrixForm
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Fri, 20 May 2011 06:39:22 -0400 (EDT)
On 5/19/11 at 7:44 AM, afolabicrystal at gmail.com (Afolabicrystal) wrote: >I have a fundamental question. >Given a long List of elements (say 60 elements). How do I break this >to an m-by-n MatrixForm (say 5-by-12). >It's kinda basic and I already feel silly asking the question. >Simple things do elude big brains sometimes. Any idea? Use Partition. For example, data = Range[9]; creates a list of 9 elements and Partition[data,3] converts this to a 3 x 3 array.