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


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

MatrixFormWrapper vs. MatrixForm

Started byroby <roby.nowak@gmail.com>
First post2012-01-21 10:18 +0000
Last post2012-01-21 10:18 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

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

#8052 — MatrixFormWrapper vs. MatrixForm

Fromroby <roby.nowak@gmail.com>
Date2012-01-21 10:18 +0000
SubjectMatrixFormWrapper vs. MatrixForm
Message-ID<jfe3cp$9u0$1@smc.vnet.net>
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

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web