Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2524

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

From Bob Hanlon <hanlonr@cox.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How To Break Long List to m-by-n MatrixForm
Date 2011-05-20 10:34 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ir5g3t$stb$1@smc.vnet.net> (permalink)

Show all headers | View raw


data = Range[60];

Partition[data, 12]

{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, {13, 14, 15, 16, 17, 18, 19,
   20, 21, 22, 23, 24}, {25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 
  36}, {37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48}, {49, 50, 51, 
  52, 53, 54, 55, 56, 57, 58, 59, 60}}

Dimensions[%]

{5, 12}


Bob Hanlon

---- Afolabicrystal <afolabicrystal@gmail.com> 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?

Thankx.


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: How To Break Long List to m-by-n MatrixForm Bob Hanlon <hanlonr@cox.net> - 2011-05-20 10:34 +0000

csiph-web