Re: Q: ReplaceAll with pattern in pattern
- To: mathgroup at smc.vnet.net
- Subject: [mg18478] Re: Q: ReplaceAll with pattern in pattern
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 7 Jul 1999 23:08:41 -0400
- Organization: Universitaet Leipzig
- References: <7lun7p$lge@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Christoph, you must use replace repeated //. matrix //. shorts /. values to resolve the additional a. Hope that helps Jens Christoph wrote: > > howdy, > > At the top of a notebook i want to define some constants like that: > > shorts={a -> b^2,d -> a/f} > values={b -> 42,f -> 27} > > and now i want to do some calculations using a,b,d,f as symbols: > > matrix={{a,b},{d,f}} > > and now I need to show the matrix: > > matrix //MatrixForm > > and now I want to know numerical values. > > matrix /.shorts /. values > > but this won't do the job. When the shorts are done, there are still > some a left, because they were introduced with the second replacement > rule. Is there any way to do things like that? > > Greetings > Christoph >