Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10450 > unrolled thread
| Started by | Tomas Garza <tgarza10@msn.com> |
|---|---|
| First post | 2012-06-14 09:29 +0000 |
| Last post | 2012-06-14 09:29 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: ToString Awkwardness Tomas Garza <tgarza10@msn.com> - 2012-06-14 09:29 +0000
| From | Tomas Garza <tgarza10@msn.com> |
|---|---|
| Date | 2012-06-14 09:29 +0000 |
| Subject | Re: ToString Awkwardness |
| Message-ID | <jrcat4$doe$1@smc.vnet.net> |
I tried the following and it seems to work:
First, evaluate
Clear[x, y];
x = NumberForm[8.71 10^-15, {4, 4}]
Immediately after this, evaluate
y = %
Finally, evaluate
Row[{"f(x) = ", y}]
-Tomas
> Date: Wed, 13 Jun 2012 04:55:34 -0400
> From: kjm@KevinMcCann.com
> Subject: ToString Awkwardness
> To: mathgroup@smc.vnet.net
>
> I have several plots with annotation that includes parameter values. I
> am using ToString inside a Text command to do this, and all is well
> unless the values are small so that the results are in scientific
> notation. When this happens, I get something like this:
>
> "f(x) = " <> ToString[8.71 10^-15]
>
> f(x) = -15
> 8.71 10
>
> Which is a bit awkward looking in the plot. Upon further investigation,
> I looked at the FullForm of the above and got:
>
> "f(x) = -15\n8.71 10"
>
> So, I see why the output "looks funny". The exponent is treated
> separately from the 10. Any suggestions for nicer looking output?
>
> Thanks,
>
> Kevin
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web