Re: StringReplace
- To: mathgroup at smc.vnet.net
- Subject: [mg77796] Re: [mg77759] StringReplace
- From: DrMajorBob <drmajorbob at bigfoot.com>
- Date: Sun, 17 Jun 2007 06:00:47 -0400 (EDT)
- References: <25940858.1181980912272.JavaMail.root@m35>
- Reply-to: drmajorbob at bigfoot.com
The FullForm (or InputForm) of the original sum is: "\!\(\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]\) f[i])" and that, unfortunately, contains more than one "n". Bobby On Sat, 16 Jun 2007 02:26:55 -0500, Bruce Colletti <vze269bv at verizon.net> wrote: > Re Mathematica 6.0 under WinXP. > > Create variable X by: > > - Punching the summation button in the BasicMathInputPalette > > - Filling in the blanks: index i goes from 1 to n, with term f[i] > > - Enclose the whole thing between double quotes, thus making X a string > variable (or so I thought) > > Now I want to replace n by 3, and so enter: > > StringReplace[X,"n"->"3"] > > The output includes a pink box that replaces the sigma and its bounds. > Thankfully, the f[i] appears. > > What causes this output and how can I get X to appear, although with n > replaced by 3? > > Thanks. > > Bruce > > > -- DrMajorBob at bigfoot.com