MathGroup Archive 1999

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

Search the Archive

Re: Re: Automatic Display in MatrixForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg19267] Re: [mg19245] Re: Automatic Display in MatrixForm
  • From: David Withoff <withoff at wolfram.com>
  • Date: Thu, 12 Aug 1999 01:24:22 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

> I learned that the former version
> 
> $Post=(#/.x_?MatrixQ->MatrixForm[x])&
> 
> contains a serious bug: In case x has been assigned a value
> elsewhere in the Mathematica session, it is substituted on the right
> hand side instead of the intended matrix matching the pattern. If
> you prefer this version, please correct it to:
> 
> $Post=(#/.x_?MatrixQ:>MatrixForm[x])&;

Even better is

$PrePrint = <your transformation>

since the objective here is to adjust the display rather
than the result of the calculation.  With the assignment
to $Post you could, for example, get unexpected results
from calculations using %, since matrices will be
wrapped in MatrixForm.

Dave Withoff
Wolfram Research


  • Prev by Date: Re: Element Extraction
  • Next by Date: RE: Automatic Display in MatrixForm
  • Previous by thread: Re: Automatic Display in MatrixForm
  • Next by thread: RE: Automatic Display in MatrixForm