MathGroup Archive 2001

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

Search the Archive

Re: array generated

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28915] Re: array generated
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Fri, 18 May 2001 01:13:19 -0400 (EDT)
  • References: <9e02qv$30o@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Julian Sweet" <jsweet at engineering.ucsb.edu> wrote in message
news:9e02qv$30o at smc.vnet.net...
> Is there a command that will allow me to specify a start and
> stop value, and the number of points i want generated?
>
> Table[i,{i,min,max,di}] requires that i specify the interval, di, and
> surmise the resultant number of points from that interval.

There's no "command." There is a method, derived from simple algebra:

f[a_,b_,p_] := Table[i,{i,a,b,(b-a)/(p-1)}]

So, for f[1,10,3], you get:

{1, 11/2, 10}

--
Paul Lutus
www.arachnoid.com





  • Prev by Date: Re: array generated
  • Next by Date: Re: Q: Recursion on a list
  • Previous by thread: Re: array generated
  • Next by thread: Re: array generated