Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

MatrixFormWrapper vs. MatrixForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124481] MatrixFormWrapper vs. MatrixForm
  • From: roby <roby.nowak at gmail.com>
  • Date: Sat, 21 Jan 2012 05:15:34 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi all,

what about the following construct ?

In[1]:= MatrixFormWrapper[M_] := BoxData@RowBox[{"(", GridBox[M],
")"}] //
 (NotebookWrite[SelectedNotebook[], Cell[#, "Output"]]; M) &

In[2]:= A = IdentityMatrix[3] // MatrixFormWrapper;


gives a pretty MatrixForm like output:
( {
  {1, 0, 0},
  {0, 1, 0},
  {0, 0, 1}
 } )

In[3]:= A

Out[3]= {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}

The only pitty with this is that one cannot use output suppression by
a semicolon,
any clou how this could be fixed ?


Cheers Robert



  • Prev by Date: DynamicModule to set locations of 3D points from 2D LocatorPane?
  • Next by Date: select 1st column element based on criteria in 2nd AND 3rd column
  • Previous by thread: Re: DynamicModule to set locations of 3D points from 2D LocatorPane?
  • Next by thread: Re: MatrixFormWrapper vs. MatrixForm