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
- Follow-Ups:
- Re: MatrixFormWrapper vs. MatrixForm
- From: Bob Hanlon <hanlonr357@gmail.com>
- Re: MatrixFormWrapper vs. MatrixForm