MathGroup Archive 2013

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

Search the Archive

Re: extract from Reduce

  • To: mathgroup at
  • Subject: [mg130371] Re: extract from Reduce
  • From: Šerých Jakub <Serych at>
  • Date: Thu, 4 Apr 2013 22:35:56 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <>

Try ToRules[] and than /. and you have pure list of results. For example:

x /. {ToRules[Reduce [x^8 == 1]]}


> -----Original Message-----
> From: hamiltoncycle at [mailto:hamiltoncycle at]
> Sent: Thursday, April 04, 2013 4:51 AM
> To: mathgroup at
> Subject: extract from Reduce
> I have a result from the command Reduce that looks like this (as an
> example):
> a:= x==3||x==4||x==7
> I need to extract the numbers but I can't find a nice way to handle the case
> when there is only one equation, for instance:
> a:= x==6
> currently I check what the head of the expression is (Head[a]) and handle
> the case Head[a]=Or with a Map[] and the case Head[a]="Equal" with a[[2]].
> Not very nice, but I guess that there is a neat way to do it.
> cheers, Robert

  • Prev by Date: Re: 3D ViewPoint Selector (V5.2) in higher Mathematica versions ?
  • Next by Date: Re: find position in a list made by string by searching incomplete
  • Previous by thread: Re: extract from Reduce
  • Next by thread: Re: extract from Reduce