Re: extract only positive solutions
- To: mathgroup at smc.vnet.net
- Subject: [mg125030] Re: extract only positive solutions
- From: andres <jarosham at gmail.com>
- Date: Sat, 18 Feb 2012 06:27:43 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jhldd0$oql$1@smc.vnet.net>
I don't fully understand, NSolve (or any solver) gives the solutions as a set of rules, not as a list of numbers. >From your example I guess you want to extract the pairs whose first element is > 0. If that's the case I'd use Select: Select[sol, #[[1]] > 0 &] Andr=E9s On Feb 17, 6:24 am, Gabby Domingo <gbdomi... at gmail.com> wrote: > hi all! how do you extract only positive solutions to a solver, like > NSolve? > > sol={{-.532,.932},{.34,23}} > > and extract {.34,.23}?