Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: Replacement

  • To: mathgroup at smc.vnet.net
  • Subject: [mg4471] Re: Replacement
  • From: Stephen P Luttrell <luttrell at signal.dra.hmg.gb>
  • Date: Mon, 29 Jul 1996 02:37:24 -0400
  • Organization: Defence Research Agency, Malvern
  • Sender: owner-wri-mathgroup at wolfram.com

Sergej Gerassimov wrote:
> 
> Hi,
> 
> I have something like
> 
> x/Sqrt[a^2+b^2]+Sqrt[a^2+b^2]/y
> 
>...DELETIA...
>
> How to replace Sqrt[a^2+b^2] by r everywhere in the expression?

Try this, for example:

Unprotect[Sqrt];
Sqrt[a^2+b^2] := r;
Protect[Sqrt];
x/Sqrt[a^2+b^2]+Sqrt[a^2+b^2]/y

-- 
Dr Stephen P Luttrell                  luttrell at signal.dra.hmg.gb
Adaptive Systems Theory                01684-894046 (phone)
Room EX21, Defence Research Agency     01684-894384 (fax)           
Malvern, Worcs, WR14 3PS, U.K.         http://www.dra.hmg.gb/cis5pip/Welcome.html

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Replacement
  • Next by Date: Re: help: Write data to file into many columns
  • Previous by thread: Re: Replacement
  • Next by thread: Re: bar charts with error bars?