Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2001

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

Search the Archive

Re: array generated

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28899] Re: [mg28889] array generated
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Fri, 18 May 2001 01:13:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

If I have understood you correctly then the following will do it:

In[1]:=
SetAttributes[myTable,HoldAll]
In[2]:=
myTable[f_,{i_,min_,max_,1}]:=min
In[3]:=
myTable[f_,{i_,min_,max_,pts_Integer?Positive}]:=
  Table[f,{i,min,max,(max-min)/(pts-1)}]

For example:

In[4]:=
myTable[i^2,{i,3,5,4}]

Out[4]=
    121  169
{9, ---, ---, 25}
     9    9


-- 
Andrzej Kozlowski
Toyama International University
JAPAN

http://platon.c.u-tokyo.ac.jp/andrzej/
http://sigma.tuins.ac.jp/~andrzej/


on 01.5.17 5:23 PM, Julian Sweet at jsweet at engineering.ucsb.edu wrote:

> 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.
> 
> 
> e-mail response appreciated: jsweet at engineering.ucsb.edu
> 
> 



  • Prev by Date: Is color overlapping possible with Mathematica?
  • Next by Date: Can Mathematica draw overlapping shapes with blended color?
  • Previous by thread: Re: array generated
  • Next by thread: RE: array generated