MathGroup Archive 2010

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

Search the Archive

Re: Percentage Formating

On 7/17/10 at 8:16 AM, sebastian.mirandadiaz at (SMiranda)

>There's an easy way of formating percentage numbers form reporting
>purposes... I mean... 0.05263 --> 5.26%

Here is one way

In[6]:= ToString[NumberForm[0.05263 100, 3]] <> "%"

Out[6]= 5.26%

Note, this will not display all values to an accuracy of 0.01%
since it only retains 3 significant digits. Another method would be:

In[7]:= ToString[Round[0.05263 100, .01]] <> "%"

Out[7]= 5.26%

which will display all values to an accuracy of 0.01%.

  • Prev by Date: Re: Combine matrices of equal height
  • Next by Date: Re: Percentage Formating
  • Previous by thread: Percentage Formating
  • Next by thread: Re: Percentage Formating