MathGroup Archive 1999

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

Search the Archive

Q: ReplaceAll with pattern in pattern

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18459] Q: ReplaceAll with pattern in pattern
  • From: handel at hrzpub.tu-darmstadt.de (Christoph)
  • Date: Wed, 7 Jul 1999 00:11:39 -0400
  • Organization: -
  • Sender: owner-wri-mathgroup at wolfram.com

 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

PS: Mathematica 3.0 on NT
PPS: please also use eMail to reply


  • Prev by Date: Re: Re: "At long last, Sir, have you no shame?"
  • Next by Date: Re: best line through a set of 3D points
  • Previous by thread: Re: out of memory reading large(?) file (Q:)
  • Next by thread: Re: Q: ReplaceAll with pattern in pattern