Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8095
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: MatrixFormWrapper vs. MatrixForm |
| Date | 2012-01-22 12:33 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jfgvmh$pmp$1@smc.vnet.net> (permalink) |
| References | <201201211015.FAA10108@smc.vnet.net> |
Why use something that is MatrixForm-like? Use MatrixForm
(A = IdentityMatrix[3]) // MatrixForm
(A = IdentityMatrix[3]) // MatrixForm;
Bob Hanlon
On Sat, Jan 21, 2012 at 5:15 AM, roby <roby.nowak@gmail.com> wrote:
> 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
Re: MatrixFormWrapper vs. MatrixForm Bob Hanlon <hanlonr357@gmail.com> - 2012-01-22 12:33 +0000
csiph-web