Re: Creating a set from two other sets
- To: mathgroup at smc.vnet.net
- Subject: [mg84773] Re: Creating a set from two other sets
- From: Peter Breitfeld <phbrf at t-online.de>
- Date: Sun, 13 Jan 2008 06:25:51 -0500 (EST)
- References: <fmcqap$ga0$1@smc.vnet.net>
ahallam at iastate.edu schrieb: > 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? Do you want something like this: z = {0, 1, 2, 3, 4}; n = {-1, 1, 2, 3}; Union@Flatten@Table[a/b, {a, z}, {b, n}] Gruss Peter -- ==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-== Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de