MathGroup Archive 2008

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

Search the Archive

Re: Re: Creating a set from two other sets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84777] Re: [mg84774] Re: Creating a set from two other sets
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 14 Jan 2008 03:44:48 -0500 (EST)
  • Reply-to: hanlonr at cox.net

In v6 you can also do this directly with Table

Outer[#1/#2 &, {0, 1, 2, 3, 4}, {-1, 1, 2, 3}] ==
 Table[a/b, {a, {0, 1, 2, 3, 4}}, {b, {-1, 1, 2, 3}}]

True


Bob Hanlon

---- Steve Luttrell <steve at _removemefirst_luttrell.org.uk> wrote: 
> In[1]:= Outer[#1/#2&,{0,1,2,3,4},{-1,1,2,3}]
> Out[1]= {{0,0,0,0},{-1,1,1/2,1/3},{-2,2,1,2/3},{-3,3,3/2,1},{-4,4,2,4/3}}
> 
> Stephen Luttrell
> West Malvern, UK
> 
> <ahallam at iastate.edu> wrote in message news:fmcqap$ga0$1 at smc.vnet.net...
> > So I would like to create a set AB which consists of all ratios a/b
> > where a is an element of {0,1,2,3,4} and b is an element of
> > {-1,1,2,3}.  Table does not seem to let me use elements of a set as
> > compared to sequential lists.
> > 
> > Any ideas?
> > 
> >
> 



  • Prev by Date: WinXP & JLink`InstallJava::fail
  • Next by Date: documentation specification for Documentation Center
  • Previous by thread: Re: Creating a set from two other sets
  • Next by thread: Re: Creating a set from two other sets