MathGroup Archive 2008

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

Search the Archive

Re: Simplify


Hi,

lst = {2 cet1, 0, -2 cet1, cet1, 0, -cet1};

and

lst /. r : {(cet1*_. | 0) ..} :> cet1 HoldForm @@ { r/cet1}

Regards
   Jens


Cetin Haftaoglu wrote:
> Dear Mathematica-users,
> 
> I have a simple question about to simplify a expression (a list/matrices). I
> have a list like
> 
> {2 cet1, 0, -2 cet1, cet1, 0, -cet1}
> 
> And I want to extract if possible the factor cet1, so I become a list like
> 
> cet1{2, 0, -2, 1, 0, -1}
> 
> How can I extract the factor?
> 
> TIA and regards,
> 
> Cetin
> 
> 
> 


  • Prev by Date: No preferences for OSX
  • Next by Date: Re: Simplify
  • Previous by thread: Simplify
  • Next by thread: Re: Simplify