MathGroup Archive 2009

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

Search the Archive

Re: how to keep multiplication sign "*" ( Please)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97593] Re: how to keep multiplication sign "*" ( Please)
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Mon, 16 Mar 2009 04:25:40 -0500 (EST)
  • References: <gpil8l$571$1@smc.vnet.net>

Unprotect[Times];
Times /: MakeBoxes[Times[x_, y_], StandardForm] :=
 RowBox[{MakeBoxes[x, StandardForm], MakeBoxes["*", StandardForm],
   MakeBoxes[y, StandardForm]}]
Protect[Times];

Cheers -- Sjoerd

On Mar 15, 12:28 pm, Volkan <visb... at gmail.com> wrote:
> How can I keep the multiplication sign in a symbolic calculation
> output such as:
>
> Sum[A[i][j] *B[i][j], {i, 1, 2}, {j, 1, 2}]
>
> gives
> A[1][1] B[1][1] + A[1][2] B[1][2] + A[2][1] B[2][1] + A[2][2] B[2][2]
>
> but what I want is it should seem like
>
> A[1][1] *B[1][1] + A[1][2] *B[1][2] + A[2][1] *B[2][1] + A[2][2] *B[2]
> [2]
>
> Is this possible? Please help about this...
>
> thanks



  • Prev by Date: Re: CForm of a synbolic expression
  • Next by Date: Different results with FourierTransform[]
  • Previous by thread: Re: how to keep multiplication sign "*" ( Please)
  • Next by thread: ANOVA PostHoc Dunnett