Re: How can I make the NSolve output the roots meeting
- To: mathgroup at smc.vnet.net
- Subject: [mg86460] Re: [mg86446] How can I make the NSolve output the roots meeting
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Wed, 12 Mar 2008 00:09:35 -0500 (EST)
- Reply-to: hanlonr at cox.net
eqn = (x - 2) (x - 4) (x + 5) (x - 5 I) x == 0; Select[Solve[eqn, x], Element[#[[1, 2]], Reals] && #[[1, 2]] > 0 &] {{x -> 2}, {x -> 4}} Select[NSolve[eqn, x], Element[#[[1, 2]], Reals] && #[[1, 2]] > 0 &] {{x -> 2.}, {x -> 4.}} Bob Hanlon ---- Elements <philyer at gmail.com> wrote: > Hi everyone, > I'm dealing with an equation with NSolve, and there are many roots > of this equation, but I only need the roots which a real and positive. > So which function or option should I choose? > Thanks! > > -- > Best Wishes! > Yours Sincerely >