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


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

MatrixFormWrapper vs. MatrixForm

From roby <roby.nowak@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject MatrixFormWrapper vs. MatrixForm
Date 2012-01-21 10:18 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jfe3cp$9u0$1@smc.vnet.net> (permalink)

Show all headers | View raw


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

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


Thread

MatrixFormWrapper vs. MatrixForm roby <roby.nowak@gmail.com> - 2012-01-21 10:18 +0000

csiph-web