Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Folding lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18131] Folding lists
  • From: "Alan W.Hopper" <awhopper at hermes.net.au>
  • Date: Fri, 18 Jun 1999 00:51:38 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

I have an output from Mathematica 3, which consists of n paired lists,
all with k elements each.

e.g. n = 2,  k = 6 ;

In[1]:=  lists = {{{1,10,9,12,3,4},{0,7,6,9,2,3}},
		         {{2,7,5,11,6,8},{1,5,3,8,4,6}}};

In[2]:=  DisplayForm[GridBox[Flatten[lists,1]]]

Out[3]//DisplayForm=
           1  10   9  12   3   4 
          
           0   7   6   9   2   3
          
           2   7   5  11   6   8
          
           1   5   3   8   4   6 


Now this is what I want for short lists, although a greater space between
the list pairs would be better.
But with longer lists of say 100 elements in each sub-list,
the GridBox output extends beyond the window width, has to be scrolled
for viewing and printing is not feasible.

So I was wondering does anyone know a way to fold and interleave each 
pair 
of long lists of this type, keeping the paired elements matched 
vertically.

 In GridBox or TableForm style, something like this;

List A (part 1) ............................................
List B (part 1) ............................................
     (space)
List A (part 2) ............................................
List B (part 2) ............................................
     (space)
       .
       .

So that all the elements in each paired list are aligned, in folded 
columns
of about 20 or so, to fit into the window.

Thanks for any suggestions,



Alan Hopper
awhopper at hermes.net.au        


  • Prev by Date: Re: Options for a function
  • Next by Date: Re: Version 4.0 - Importing TIF files
  • Previous by thread: Re: How to plot more curves on one graph
  • Next by thread: LiveGraphics3D: missing geometry