Re: Simplify
- To: mathgroup at smc.vnet.net
- Subject: [mg91099] Re: Simplify
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 6 Aug 2008 05:04:59 -0400 (EDT)
- References: <g791is$9ng$1@smc.vnet.net>
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 > > >