MathGroup Archive 1999

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

Search the Archive

Coefficients in expressions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16742] Coefficients in expressions
  • From: Virgil Stokes <virgil.stokes at neuro.ki.se>
  • Date: Wed, 24 Mar 1999 02:23:53 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

I have generated several expressions (equations) in the form of:

   c1*x1 + c2*x1' + c3*x2 + c4*y1+...+a1*x1'+ a2*y1 + a5*x1 +... == f1*z1 +...

where, the equations can be over 50 lines in length.
I would like to have a procedure (say Coeffs[.]) that would
allow me to specify as input the "names" in the equations. The
output would be all the coefficients for that list of names.
For example, for the above,

  Coeffs[%,x1,x1',y1]

would output,

    x1: (c1+a5)
 x1': (c2+a1)
  y1: (c4+a2)

-- V. Stokes




  • Prev by Date: LogLinearListPlot
  • Next by Date: Re: Combining Lists
  • Previous by thread: Re: another set of global variables
  • Next by thread: Re: Coefficients in expressions