Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8592 > unrolled thread

Re: extract only positive solutions

Started byBill Rowe <readnews@sbcglobal.net>
First post2012-02-18 11:29 +0000
Last post2012-02-18 11:29 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: extract only positive solutions Bill Rowe <readnews@sbcglobal.net> - 2012-02-18 11:29 +0000

#8592 — Re: extract only positive solutions

FromBill Rowe <readnews@sbcglobal.net>
Date2012-02-18 11:29 +0000
SubjectRe: extract only positive solutions
Message-ID<jho22i$5sg$1@smc.vnet.net>
On 2/17/12 at 6:23 AM, gbdomingo@gmail.com (Gabby Domingo) wrote:

>hi all! how do you extract only positive solutions to a solver, like
>NSolve?

>sol={{-.532,.932},{.34,23}}

>and extract {.34,.23}?

Here is an example of one way

In[3]:= p = (x + 3) (x - 4) (x - 5) // Expand;

In[4]:= Cases[Solve[p == 0, x], {_?(x > 0 /. # &)}]

Out[4]= {{x->4},{x->5}}

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web