Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4736

Re: Pascal's triangle spacing is off. Need DigitCount?

From Christopher Young <cy56@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Pascal's triangle spacing is off. Need DigitCount?
Date 2011-09-04 08:16 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j3vc5f$ek9$1@smc.vnet.net> (permalink)
References <201109031204.IAA05249@smc.vnet.net> <9C709B2D-E064-4D91-A14C-67B9909267BD@gmail.com>

Show all headers | View raw


Thanks, I stumbled upon that after fiddling around for a while. Seems to me it would be a handy option to have in Row[ ], also.

On Sep 3, 2011, at 5:01 PM, Heike Gramberg wrote:

> You could use Grid  in combination with ItemSize instead of Row to give all the entries the same width, e.g.
>
> pascalTrngl2[n_] :=
> Module[{max, sp}, max = Max[Table[Binomial[n, j], {j, 0, n}]];
>  sp = Round[N[Log[10, max], 5]];
>  Column[Table[Grid[{Table[Binomial[i, j], {j, 0, i}]},
>     ItemSize -> sp], {i, 0, n}], Center]]
>
> pascalTrngl2[10]
>
> Heike

Chris Young
cy56@comcast.net

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Pascal's triangle spacing is off. Need DigitCount? Christopher Young <cy56@comcast.net> - 2011-09-04 08:16 +0000

csiph-web