MathGroup Archive 2002

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

Search the Archive

Re: Table using as iterator a multiple of 10, 100, ...,10^n

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37139] Re: Table using as iterator a multiple of 10, 100, ...,10^n
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sun, 13 Oct 2002 05:56:18 -0400 (EDT)
  • References: <ao8ool$bo7$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Guillermo,

Instead of

    Flatten[{{{"d","X","Y","Z"}},Table[{t,x[t],y[t],z[t]},{t,1,10}],
      Table[{t,x[t],y[t],z[t]},{t,20,100,10}],
      Table[{t,x[t],y[t],z[t]},{t,200,1000,100}]},1];

we can use


    Flatten[{{{{"d","X","Y","Z"}}},
      Table[{t,x[t],y[t],z[t]},#]&/@{{t,1,10},{t,20,100,10},{t,200,1000,
            100}}},2];

Test
    %===%%

        True

--
Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565


<guillerm at usal.es> wrote in message news:ao8ool$bo7$1 at smc.vnet.net...
> Dear friends,
> I have build a table with this pattern:
>
> Flatten[{{{"d", "X", "Y", "Z"}},
>       Table[{t, x[t], y[t], z[t]}, {t, 1, 10}],
>       Table[{t, x[t], y[t], z[t]}, {t, 20, 100, 10}],
>       Table[{t, x[t], y[t], z[t]}, {t, 200, 1000, 100}]}, 1] // TableForm
>
> I would like obtain the same Output in a more elegant way. In other word,
how
> Can I avoid write "Table[{t, x[t], y[t], z[t]}" a few times.
>
> Thans
>
> Guillermo
> Sanchez
>
> ---------------------------------------------
> This message was sent using Endymion MailMan.
> http://www.endymion.com/products/mailman/
>
>
>




  • Prev by Date: Re: ParametricPlot Question
  • Next by Date: Re: The Essence of Mathematica
  • Previous by thread: RE: Table using as iterator a multiple of 10, 100, ...,10^n
  • Next by thread: Re: Table using as iterator a multiple of 10, 100, ...,10^n