MathGroup Archive 2007

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

Search the Archive

Re: Cascaded (Multi-range) Iterators?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79070] Re: [mg79025] Cascaded (Multi-range) Iterators?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 17 Jul 2007 03:29:44 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Flatten[Table[f[x], #] & /@ {{x, 0, 1, 0.1}, {x, 2, 10}, {x, 20, 100, 
    10}}, 1]

{f[0.], f[0.1], f[0.2], f[0.3], f[0.4], f[0.5], 
   f[0.6], f[0.7], f[0.8], f[0.9], f[1.], 
   f[2], f[3], f[4], f[5], f[6], f[7], f[8], f[9], f[10], f[20], 
 f[30], 
   f[40], f[50], f[60], f[70], f[80], f[90], f[100]}


Bob Hanlon

---- AES <siegman at stanford.edu> wrote: 
> Seems like a very useful (and feasible?) (and not too difficult) 
> extension to the Iterator concept for Tables, etc., would be a cascaded 
> or multi-range Iterator, e.g. something like
> 
>     Table[ f[x],  { {x, 0, 1, 0.1}, {x, 2, 10}, {x, 20, 100, 10} } ]
> 
> I often have need for a "different step sizes over different ranges" 
> capability like this, and have to resort to workarounds to achieve it.
> 
> [Apologies if my searches in the Help files have missed something that 
> already does this.]
> 



  • Prev by Date: Re: Cascaded (Multi-range) Iterators?
  • Next by Date: math -mathlink, ssh ...
  • Previous by thread: Re: Cascaded (Multi-range) Iterators?
  • Next by thread: Re: Cascaded (Multi-range) Iterators?