MathGroup Archive 2001

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

Search the Archive

Re: array generated


"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