MathGroup Archive 2011

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

Search the Archive

Re: what's wrong?!!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115701] Re: what's wrong?!!
  • From: Peter Pein <petsie at dordos.net>
  • Date: Tue, 18 Jan 2011 05:54:00 -0500 (EST)
  • References: <ih16b7$jiq$1@smc.vnet.net>

On 17.01.2011 11:40, olfa wrote:
> Hi Mathematica community,
>
> I try to use Case[exp,patt,Infinity]
>
> for the first example it works:
> Cases[iP == i + v&&  kaP == 3^v,  iP == _ | kaP == _, Infinity]
> the output is  {iP == i + v, kaP == 3^v}
>
> but not for the second one!!
>   Cases[yP == y + x - z, yP == _, Infinity]
> the output is  {}
>
> why?!!
>
> Thank you.
>

Hi,

I ran into the same trap a few weeks ago...

In[1]:= Cases[yP == y + x - z, yP == _, {0, Infinity}]

Out[1]= {yP == x + y - z}

your first example works becaus the equations are located one level 
deeper (due to And[..]).

Peter


  • Prev by Date: Re: log expression not simplified
  • Next by Date: Re: Solve fails with this simple inequality problem
  • Previous by thread: Re: what's wrong?!!
  • Next by thread: Re: what's wrong?!!