Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: need to make a special function

  • To: mathgroup at
  • Subject: [mg68341] Re: [mg68284] need to make a special function
  • From: gardyloo <gardyloo at>
  • Date: Tue, 1 Aug 2006 07:00:20 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

Hi, Nabeel,

    Try something like

        f[n_]:= Table[IntegerDigits[i, 2, n], {i, 0, 2^n -1}]


Nabeel Butt wrote:
> Dear Users,
>         I need help on making a special type of function which has the
> following properties.
>    f[1]={{0},{1}}
>    f[2]={{0,0},{0,1},{1,0},{1,1}}
>    f[3]={{0,0,0},{0,0,1},{0,1,0},{0,1,1},{1,0,0},{1,0,1},{1,1,0},{1,1,1}}
> on you can see the pattern emerging.
>  I need a very efficient code to perform the above evaluation in some
> optimization problem.
>     Thanks in advance.
>      regards,
>         Nabeel

Curtis Osterhoudt          
gardyloo at
PGP Key ID: 0x088E6D7A
Please avoid sending me Word or PowerPoint attachments

  • Prev by Date: Re: x=2;Composition[f,FindMinimum][x+1,{x,a}]
  • Next by Date: Re: x=2;Composition[f,FindMinimum][x+1,{x,a}]
  • Previous by thread: Re: need to make a special function
  • Next by thread: Re: need to make a special function