MathGroup Archive 2000

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

Search the Archive

Re: Sort Solve's results

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24573] Re: Sort Solve's results
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 25 Jul 2000 00:56:06 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8lgrkc$28k@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

why to sort at all ?

Thread[SPNames -> (SPNames /.
Solve[{SPNames==SPNames.TPM,Apply[Plus,SPNames]==1},SPNames])]

will return the list of rules in the same order as in SPNames.

Regards
  Jens

Steven Scroggin wrote:
> 
> In writing a small program I am using Solve for a system to be solved for a
> 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 I
> 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 solved
> for and TPM is a square matrix.  A typical SPName is p[1].  The system has a
> unique solution.
> 
> --
> scrog at lvcm.com
> Steven Scroggin


  • Prev by Date: Re: Windows 9X or Linux?
  • Next by Date: Re: Windows 9X or Linux?
  • Previous by thread: Sort Solve's results
  • Next by thread: partitions