MathGroup Archive 2009

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

Search the Archive

Re: Solve problem


In[1]:= a1 /. Cases[{{b1 -> -2, a1 -> -1}, {b1 -> 0.5, a1 -> 3}},
     r : (a1 -> (i_)?Positive), Infinity]
Out[1]= 3
In[2]:= a1 /. Cases[{{a1 -> 1, b1 -> 3}}, r : (a1 -> (i_)?Positive),
Infinity]
Out[2]= 1


Adriano Pascoletti

2009/3/27 Bruno Campanini <BC at gmail.com>

> I have a Solve[...] which gives me solutions like
> {{b1 -> -2, a1 -> -1 }, {b1 -> 0.5, a1 -> 3}}
> or like
> {{a1 -> 1, b1 -> 3}}
>
> How can I get the positive value for a1, which is  3
> in the first case and  1  in the second one?
>
> Bruno
>
>



  • Prev by Date: Re: Solve problem
  • Next by Date: Re: How do I hide all input in a Mathematica notebook?
  • Previous by thread: Solve problem
  • Next by thread: Re: Solve problem