Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Domains

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85332] Re: Domains
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 6 Feb 2008 05:41:45 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <foavks$hn3$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

dom = {1, 2, 3};
x /: Element[x, dom] := True

and

Element[x, {1, 2, 3}]

gives True

Regards
   Jens

Akki wrote:
> Hi,
> 
> How does one create a domain for a variable in Mathematica ?
> 
> For e.g. x is a variable and I would like to create a domain for x
> consisting  of 3, 5, 7 only.
> i.e. dom = {3,5,7} then use the condition \Element[x,dom]
> 
> Thanks,
> Akki
> 


  • Prev by Date: Re: Positioning in CellFrameLabels
  • Next by Date: Re: Tooltips and PlotMarkers
  • Previous by thread: Re: Domains
  • Next by thread: Re: Domains