MathGroup Archive 2000

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

Search the Archive

Re: Sort Solve Results


If uk is your list of unknowns and sol is the solution from Solve then

Thread[Rule[uk, uk /. sol[[1]]]]

will give what you want.

Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Steven Scroggin" <scrog at> wrote in message
news:8lgth3$2gr at
> In writing a small program I am using Solve for a system to be solved for
> 9 tuple of unknowns.  I need to work with the results in the order I
> supplied them, but Solve does not return them in the order given.  How do
> reshuffle them ?
> Specifically, I have
> Solve[{SPNames==SPNames.TPM,Apply[Plus,SPNames]==1},SPNames];
> Where SPNames is a vector containing the names of the variables to be
> for and TPM is a square matrix.  A typical SPName is p[1].  The system has
> unique solution.
> --
> scrog at
> Steven Scroggin

  • Prev by Date: Re: Newbie
  • Next by Date: Re: Confluent hypergeometric functions of matrix argument
  • Previous by thread: Sort Solve Results
  • Next by thread: Sort Solve's results