MathGroup Archive 1998

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

Search the Archive

Re: making MatrixForm[] default?


  • To: mathgroup@smc.vnet.net
  • Subject: [mg11453] Re: making MatrixForm[] default?
  • From: Paul Abbott <paul@physics.uwa.edu.au>
  • Date: Thu, 12 Mar 1998 01:34:05 -0500
  • Organization: University of Western Australia
  • References: <6dv5mj$5kl@smc.vnet.net>

Barry Wark wrote:

> I am doing a lot of work in Mathematic for my linear algebra class. I
> find that I'm doing a lot of MatrixForm[] around commands to generate
> output that I am comfortable reading. Is there any way to make
> MatrixForm the default method for displaying matricies (lists) so that
> I don't have to keep typing it?

You could use 

	$PrePrint = If[MatrixQ[#],MatrixForm[#],#]&;

which causes _all_ matrices to be printed in MatrixForm, e.g.,

In[1]:= $PrePrint = If[MatrixQ[#],MatrixForm[#],#]&

Out[1]= If[MatrixQ[#1], #1, #1] &

In[2]:= {{a,b},{c,d}}

Out[2]= a   b

        c   d

The $PrePrint command could be put into init.m so that it is loaded each
time you fire up Mathematica.

The alternative I prefer is to use TraditionalForm as the default (at
least for output) instead of StandardForm.

Cheers,
	Paul 
 
____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul@physics.uwa.edu.au  AUSTRALIA                            
http://www.pd.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________



  • Prev by Date: Mixed Algebraic/differential system
  • Next by Date: Re: ListContourPlot: actual x and y values marked on the axes?
  • Prev by thread: making MatrixForm[] default?
  • Next by thread: Mathematica Graphics Book Review...