MathGroup Archive 2012

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

Search the Archive

Re: MatrixFormWrapper vs. MatrixForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124526] Re: MatrixFormWrapper vs. MatrixForm
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sun, 22 Jan 2012 07:28:07 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • 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 at 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
>



  • Prev by Date: Re: select 1st column element based on criteria in 2nd AND 3rd column
  • Next by Date: Re: select 1st column element based on criteria in 2nd AND 3rd column
  • Previous by thread: MatrixFormWrapper vs. MatrixForm
  • Next by thread: Re: MatrixFormWrapper vs. MatrixForm