Re: Replace and ReplaceAll -- simple application
- To: mathgroup at smc.vnet.net
- Subject: [mg105953] Re: [mg105922] Replace and ReplaceAll -- simple application
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Sun, 27 Dec 2009 02:27:23 -0500 (EST)
- References: <200912270006.TAA12080@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
1. (y1 - 1. yr) // Rationalize y1 - yr Bobby On Sat, 26 Dec 2009 18:06:43 -0600, amannuc1 <Anthony.J.Mannucci at jpl.nasa.gov> wrote: > I am doing some manipulations in Mathematica and end up with > constructs such as "1." in the expressions. I want to convert these to > "1" and thereby eliminate them. However, these examples don't seem to > work. This is Mathematica 7 on OS X. > > In[40]:= > Replace[1.(y1-1.yr),1.->1] > Out[40]= 1. (y1-1. yr) (* Nothing happens *) > > In[39]:= > ReplaceAll[1.(y1-1.yr),1.->1] > Out[39]= y1-1. yr (* Only first one is replaced *) > > Any help is appreciated. Thanks. > > -Tony > -- DrMajorBob at yahoo.com
- References:
- Replace and ReplaceAll -- simple application
- From: amannuc1 <Anthony.J.Mannucci@jpl.nasa.gov>
- Replace and ReplaceAll -- simple application