MathGroup Archive 2004

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

Search the Archive

Re: To create {{},{},....{}} beyond $MaxRecursionLimit

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46733] Re: To create {{},{},....{}} beyond $MaxRecursionLimit
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 4 Mar 2004 00:47:30 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <c238e9$igj$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I love your code but

lst=Table[{},{lengthlist}]

may do it a bit shorter.

Regards
  Jens

János wrote:
> 
> Hi,
> 
> I am in need of creating a nested list in  the form of {{},{},....{}}
> of arbitrary length where none of the sublists have any element in it.
> I came up with
> 
> lst = NestList[List, {},lengthlist - 1]
> 
> For[i = 2, i <=
>      lengthlist, i++, flt = Table[{j}, {j, i, lengthlist}]; lst =
> FlattenAt[lst, flt]]
> 
> however it complains  when lengthlen is over $MaxRecursionLimit.  I see
> that I can change that Limit to Infinity, but I rather would not go
> that route.  It must be a better way without using NestList.
> 
> Any good hint ?
> 
> Thanks ahead,
> 
> János
> -------------------------------------------------
> clear perl code is better than unclear awk code; but NOTHING comes
> close to unclear perl code
> http://www.faqs.org/faqs/computer-lang/awk/faq/


  • Prev by Date: Re: Mathematica to Word
  • Next by Date: Re: Plot3D animation problems.
  • Previous by thread: Re: To create {{},{},....{}} beyond $MaxRecursionLimit
  • Next by thread: RE: To create {{},{},....{}} beyond $MaxRecursionLimit