MathGroup Archive 1998

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

Search the Archive

Re: A Bug / Feature



Hi Ted, it's a feature and it's a nice one (at least for my gusto). You
may want to re-read 2.8 and especially 2.8.2 of the BOOK. All those
"...Form"s change the output, and it would be quite nasty if you could
not get at the corresponding expression with the % mecanism, right? On
the other hand if you insist to make a wrapper part of a variables
definition then do it. If you want to see m1 in MatrixForm but have it
defined internally as the matrix, you may use
(m1={{1,2},{3,4}})//MatrixForm.

Jrgen

-----Original Message-----
From: Ersek_Ted%PAX1A@mr.nawcad.navy.mil To: mathgroup@smc.vnet.net
<Ersek_Ted%PAX1A@mr.nawcad.navy.mil> Subject: [mg12580] [mg12521] A Bug / Feature


>I don't know if this is a bug or a feature, but I don't like what I get
>for {Head[expr], Head[%n]}  in the lines below!

>In[1]:=
>m1=MatrixForm[{{1,2},{3,4}}]
>Out[1]//MatrixForm=
>(* output deleted *)

>In[2]:=
>{Head[m1],Head[%1]}
>Out[2]=
>{MatrixForm, List}

(some part erased)
____________________________
>If you do the following:

>In[1]:=
>m1=MatrixForm[{{1,2},{3,4}}]
>Out[1]//MatrixForm=
>(* output deleted *)

>Then you can do;
>( In[2]:=  Inverse[%1] )
>because (%1) has the head List.
>But you can't do;
>( In[2]:= Inverse[m1] )
>because (m1) has the head MatrixForm.

>Shouldn't they both have the same head? Makes no sense to me.

>Ted Ersek





  • Prev by Date: Re: waterfall plot in Mathematica
  • Next by Date: Re: Return inside Do, For and While
  • Prev by thread: Re: A Bug / Feature
  • Next by thread: Re: A Bug / Feature