MathGroup Archive 2008

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

Search the Archive

Re: Creating a set from two other sets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84787] Re: Creating a set from two other sets
  • From: "ahallam at iastate.edu" <ahallam at iastate.edu>
  • Date: Mon, 14 Jan 2008 03:49:55 -0500 (EST)
  • References: <fmcqap$ga0$1@smc.vnet.net> <fmcsg2$htt$1@smc.vnet.net>

On Jan 13, 5:25 am, Peter Breitfeld <ph... at t-online.de> wrote:
> ahal... 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

This works really well.  Thank you.

On a related subject, is there an easy way to create either of the
sets z and n.  What I would like to do is say that x is an element of
a set if it is between (including)  0 and 4 and is an integer and so
on.

Or how to create a set that is all Reals between 4 and 8.






  • Prev by Date: documentation specification for Documentation Center
  • Next by Date: Re: updating colors in parametricplot3D
  • Previous by thread: Re: Re: Creating a set from two other sets
  • Next by thread: Re: Re: Creating a set from two other sets