Re: silly question on formatting tables
- To: mathgroup at smc.vnet.net
- Subject: [mg129128] Re: silly question on formatting tables
- From: Themis Matsoukas <tmatsoukas at me.com>
- Date: Mon, 17 Dec 2012 02:56:28 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
The question is not silly and I have not found a satisfactory answer yet. A problem is that NumberForm does not force the specified digits to all numbers. It seems to stop working past 10^-5, as the example shows. m = {{0., 1.}, {1., 0.1}, {2., 0.01}, {3., 0.001}, {4., 0.0001}, {5., 0.00001}, {6., 0.000001}, {7., 0.000001}, {8., 0.000001}, {9., 0.000001}, {10., 0.000001}}; m /. a_Real :> NumberForm[a, {3, 2}] // TableForm 0.00 1.00 1.00 0.10 2.00 0.01 3.00 0.00 4.00 0.00 5.00 0.00 6.00 1.00*10^(-6) 7.00 1.00*10^(-6) 8.00 1.00*10^(-6) 9.00 1.00*10^(-6) 10.00 1.00*10^(-6)