MathGroup Archive 2009

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

Search the Archive

Re: Coefficient Question


First@Flatten@CoefficientList[#,Variables@#]&[
8(3+5k+4x1+6x2+45x3) ]

On Oct 16, 4:02 am, Scott <sguth... at gmail.com> wrote:
> I've got the expression
>
> 8(3+5k+4x1+6x2+45x3)
>
> and I want to extract the constant 24.
>
> Yes, I can define a function and then set k and x1 and x2 and x3 to 0
> but there has to be easier way, no?
>
> Any suggestions?
>
> Thanks much.
>
> Cheers, Scott


  • Prev by Date: Re: Code folding and wrapping using the input->code method?
  • Next by Date: Re: About binary relations
  • Previous by thread: Re: Coefficient Question
  • Next by thread: Re: Coefficient Question