Re: Solve problem
- To: mathgroup at smc.vnet.net
- Subject: [mg98041] Re: [mg97988] Solve problem
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 28 Mar 2009 05:45:43 -0500 (EST)
- Reply-to: hanlonr at cox.net
a1 /. Select[{{b1 -> -2, a1 -> -1}, {b1 -> 0.5, a1 -> 3}},
(a1 /. #) > 0 &]
{3}
Cases[{{b1 -> -2, a1 -> -1}, {b1 -> 0.5, a1 -> 3}},
(a1 -> x_ /; x > 0) :> x, Infinity]
{3}
Or instead of using Solve use Reduce and include constraint on a1
Bob Hanlon
---- Bruno Campanini <BC at gmail.com> wrote:
=============
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