MathGroup Archive 2012

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

Search the Archive

Re: How to get the corresponding coefficients?


On Apr 4, 4:31 am, Titus <simplerbysimp... at gmail.com> wrote:
>  If    exp:= x3 Exp[x1+x2];
> How can I get the coefficient x3 and the exponential x1+x2 from the exp in a simple way?

I don't know if this is what you mean, but take a look at FullForm and
TreeForm of an expression.  In this case, you can access x3 and x1+x2
by just doing

exp[[1]] and exp[[2,2]]

Hope this helps.



  • Prev by Date: Re: How to get the corresponding coefficients?
  • Next by Date: Re: addRule
  • Previous by thread: Re: How to get the corresponding coefficients?
  • Next by thread: Printing Notebooks without Input/Output cells