Re: Re: From PaddedForm to numbers?
- To: mathgroup at smc.vnet.net
- Subject: [mg80574] Re: [mg80499] Re: From PaddedForm to numbers?
- From: Curtis Osterhoudt <cfo at lanl.gov>
- Date: Sun, 26 Aug 2007 03:10:00 -0400 (EDT)
- Organization: LANL
- References: <faj6fp$9gt$1@smc.vnet.net> <200708231023.GAA25596@smc.vnet.net>
- Reply-to: cfo at lanl.gov
David Bailey and Jens-Peer Kuska both gave me good answers. Thanks to them! My question was prompted out of a wish to save myself from reinventing the wheel. The "LinTicks" function produces nice ticks for plots, and I've dug into it before to make my own definitions, but I wanted to avoid that in this case. The answers given allow me to manipulate the values returned by LinTicks. I'll summarize them below. On Thursday 23 August 2007 04:23:05 David Bailey wrote: > If you really need to re-activate PaddedForm structures - rather than > just avoid them, you could use: > > yy /. PaddedForm[x_,_]->x On Thursday 23 August 2007 04:26:15 Jean-Marc Gulliet wrote: > you can use *First* to extract the original > number. (Use FullForm[y] to see the structure of y.) For instance, > > In[1]:= y = PaddedForm[1.23456, {3, 4}] > > Out[1]//PaddedForm= \!\(\* > TagBox[ > InterpretationBox["\<\" 1.2300\"\>", > 1.23456, > AutoDelete->True], > PaddedForm[#, {3, 4}]& ]\) > > In[2]:= % + 1000 == y + 1000 > > Out[2]= 1001.23 == 1000 + \!\(\* > TagBox[ > InterpretationBox["\<\" 1.2300\"\>", > 1.23456, > AutoDelete->True], > PaddedForm[#, {3, 4}]& ]\) > > In[3]:= %% + 1000 == First @ y + 1000 > > Out[3]= True -- ========================================================== Curtis Osterhoudt cfo at remove_this.lanl.and_this.gov PGP Key ID: 0x4DCA2A10 Please avoid sending me Word or PowerPoint attachments See http://www.gnu.org/philosophy/no-word-attachments.html ==========================================================
- References:
- Re: From PaddedForm to numbers?
- From: David Bailey <dave@Remove_Thisdbailey.co.uk>
- Re: From PaddedForm to numbers?