Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: How to feed a list of xy pairs into Solve to output xyz triplets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101184] Re: How to feed a list of xy pairs into Solve to output xyz triplets
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 26 Jun 2009 06:49:56 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <h1vm3r$aad$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

res = Function @@ {{x, y}, z /. Solve[6*x + 4*y + z == 1, z][[1]]};

list = {{1, 2}, {3, 1}, {5, 4}, {6, 3}, {2, 5}};

and

res @@@ list

Regards
   Jens

Bill wrote:
> Hi:
> 
> Let's say that I have a list of xy coordinate pairs:
> 
> list= {{1,2}},{3,1},{5,4},{6,3},{2,5}}.
> 
> Now I'd like to find xyz triplets using Solve for the equation 6*x + 4*y + z = 1.  > 
> xyz results:  {{1,2,-13}},{3,1,-21},{5,4,-45},{6,3,-47},{2,5,-31}}. (I used Solve 5 times.)
> 
> 
> Question: How do I code that into Mathematica for a "one shot output?" (Use Solve once.)
> 
> 
> 
> Thanks,
> 
> Bill
> 
> 
> Mathematica 6.0.1 using Win XP on a pc.
> 


  • Prev by Date: Re: display of graphics primitives
  • Next by Date: The Principle "Everything is an expression"
  • Previous by thread: Re: How to feed a list of xy pairs into Solve to output xyz triplets
  • Next by thread: Re: How to feed a list of xy pairs into Solve to output xyz triplets