Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Re: How to choose real positive solutions only?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74480] Re: [mg74470] Re: How to choose real positive solutions only?
  • From: bsyehuda at gmail.com
  • Date: Fri, 23 Mar 2007 18:57:25 -0500 (EST)

let sol={{x->3},{x->4+I},{x->4-I}} be such solution then
Cases[sol,{x->y_}/;Positive[y]] does the filtering


On 3/22/07, Terry <tharter at attglobal.net> wrote:
>
>
> Manfred,
>
>     Let's say that your complex answers are in a variable called 'ans'
> that is a list of the form a-> x + iy
> Then do something like
>
> realAns := ans a/. Select[ans,(FreeQ[#,Complex])&]
>
> HTH
> .....Terry
>
> Dix, Manfredo A wrote:
>
> >Hello,
> >this question probably came up before, but anyway:
> >
> >suppose I have a system of 3 equations and 3 unknowns,
> >which I want to solve numerically with NSolve.
> >They are polynomial of degree "n" so that I get n solutions.
> >
> >Is there a way to tell Mathematica to just return the
> >real positive solutions, and dismiss the imaginary and negative
> >ones?
> >
> >thank you so much for any help,
> >cordially,
> >
> >Manfred
> >mdix at tulane.edu
> >
> >
> >
> >
>
>
>


  • Prev by Date: Re: About function to evaluation
  • Next by Date: Re: About function to evaluation
  • Previous by thread: Re: How to choose real positive solutions only?
  • Next by thread: Re: How to choose real positive solutions only?