Re: A Functional Programming Question

*To*: mathgroup at smc.vnet.net*Subject*: [mg24707] Re: A Functional Programming Question*From*: "Rasmus Debitsch" <debitsch at Zeiss.de>*Date*: Wed, 9 Aug 2000 02:31:07 -0400 (EDT)*References*: <8mdm9v$5o7@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hello, I haven't find a way to avoid MapThread. But with MapThread : eqns = {a x + d y == 3a, b y == 0, c z == 0, e x == b e y == a z} MapThread[Equal @@ Simplify /@ ((List @@ #1)/#2) &, {eqns, {a, b, c, e}}] will work. Regards -- Rasmus Debitsch Carl Zeiss Lithos GmbH Carl Zeiss Strasse D-73447 Oberkochen eMail : debitsch at zeiss.de David Park <djmp at earthlink.net> schrieb in im Newsbeitrag: 8mdm9v$5o7 at smc.vnet.net... > Dear MathGroup, > > Suppose I have three equations. > > eqns = {a x == 0, b y == 0, c z == 0}; > > I want to divide out the constants a, b, and c. I can do it this way: > > eqns[[1]] = (#1/a & ) /@ eqns[[1]]; > eqns[[2]] = (#1/b & ) /@ eqns[[2]]; > eqns[[3]] = (#1/c & ) /@ eqns[[3]]; > eqns > > {x == 0, y == 0, z == 0} > > Is there a simpler method for doing the calculation in one statement with > functional programming, say using MapThread over eqns and {a,b,c}? Is there > any other simple approach? > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > >