MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How To Break Long List to m-by-n MatrixForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119034] Re: How To Break Long List to m-by-n MatrixForm
  • From: Sseziwa Mukasa <mukasa at gmail.com>
  • Date: Fri, 20 May 2011 06:37:34 -0400 (EDT)

On May 19, 2011, at 7:44 AM, Afolabicrystal wrote:

> Hello Friends,
>
> 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:

Partition[{0,1,2,...,59},12] gives {{0,1,2,...,11},{12,13,...,23},...{48,...,59}}

Regards,
Ssezi


  • Prev by Date: Re: How To Break Long List to m-by-n MatrixForm
  • Next by Date: Re: How To Break Long List to m-by-n MatrixForm
  • Previous by thread: Re: How To Break Long List to m-by-n MatrixForm
  • Next by thread: Re: How To Break Long List to m-by-n MatrixForm