Re: Re: Creating a set from two other sets
- To: mathgroup at smc.vnet.net
- Subject: [mg84788] Re: [mg84774] Re: Creating a set from two other sets
- From: Arne Hallam <ahallam at iastate.edu>
- Date: Mon, 14 Jan 2008 03:50:26 -0500 (EST)
- Organization: Iowa State University
- References: <20080113071810.NOTL2.263234.root@eastrmwml24.mgt.cox.net>
- Reply-to: ahallam at iastate.edu
This is great. Thank you. I did not know how to use table in picking from a set. I had defined the sets a and b so I just did the following. a={0, 1, 2, 3, 4}; b={-1, 1, 2, 3}; SA=Table[x/y,{x,a},{y,b}] Thanks. Any easy way to create a set with an infinite number of members as in 3<=x<=10? Bob Hanlon wrote: > 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? >>> >>> > -- with all thy getting get understanding---Proverbs 4:7. The gentle art of being gentle---of kindness and forgiveness, sensitivity and thoughtfulness and generosity and humility and good old-fashioned love---have gone out of fashion. Ironically, everyone is demanding their rights, and this demand is so shrill that it destroys one of the most basic rights, if we can put it like that: the right, or at least the longing and hope, to have a peaceful, stable, secure, and caring place to live, to be, to learn, and to flourish---N.T. Wright. In the wildness of speculation it has been suggested (of course more in jest than in earnest),that Europe ought to grow its corn in America, and devote itself solely to manufactures and commerce, as the best sort of division of the labour of the globe---Thomas Malthus, An Essay on the Principle of Population Book III, Chapter XII. Arne Hallam Department of Economics 266 Heady Hall Iowa State University Ames, IA 50011 ahallam at iastate.edu Work: 515-294-5861 FAX: 515-294-0221 Home: 515-292-8739
- Follow-Ups:
- Re: Re: Re: Creating a set from two other sets
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Re: Re: Creating a set from two other sets