MathGroup Archive 2003

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

Search the Archive

Re: Re: Transpose matrix does not work when MatrixForm is used, why?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg45252] Re: [mg45221] Re: Transpose matrix does not work when MatrixForm is used, why?
  • From: Dr Bob <drbob at bigfoot.com>
  • Date: Wed, 24 Dec 2003 04:35:53 -0500 (EST)
  • References: <bruqrt$t0p$1@smc.vnet.net> <bs1b8r$9m0$1@smc.vnet.net> <200312210842.DAA18953@smc.vnet.net> <B8E20599-352B-11D8-8801-00039311C1CC@mimuw.edu.pl>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

That may be easier... if we are willing to constantly pay attention to 
whether the target of Transpose is "wrapped" in MatrixForm or not. 
(Transpose/@m if it's wrapped, Transpose@m if not.)

But if we want Help's claim that evaluation is not affected to be true (it 
currently is NOT), then we have to redefine Transpose, Inverse, etc. as in 
my example.

Only then would MatrixForm act properly as a wrapper, as intended.

Bobby

On Tue, 23 Dec 2003 18:38:10 +0900, Andrzej Kozlowski <akoz at mimuw.edu.pl> 
wrote:

> This of course works, but presumably he would want do this for other 
> functions, (e.g. Inverse etc), not just transpose. So it seems to me it 
> is easier simply to use Map:
>
> m = { {1, 2, 3}, {4, 5, 6} } // MatrixForm
> Transpose/@m
>
> etc.
>
> Andrzej Kozlowski
>
> On 21 Dec 2003, at 17:42, Bobby R. Treat wrote:
>
>> Here's a "fix" -- add it to your Init.nb file:
>>
>> Unprotect[Transpose ];
>> Transpose[MatrixForm[a_]] := MatrixForm[Transpose[a]]
>> Protect[Transpose];
>>
>> Then this will probably do what you want:
>>
>> m = { {1, 2, 3}, {4, 5, 6} } // MatrixForm
>> m // Transpose
>>
>> A more complete solution would do the same for other matrix functions.
>>
>> Bobby
>>
>> Harold.Noffke at wpafb.af.mil (Harold Noffke) wrote in message 
>> news:<bs1b8r$9m0$1 at smc.vnet.net>...
>>> If you type ...
>>>
>>>     ?Transpose
>>>
>>> You get ...
>>>
>>>     "Transpose[list] transposes the first two levels in list. ... "
>>>
>>> This tells you Transpose takes a List as an argument, rather than a
>>> MatrixForm.
>>>
>>> I think this could be corrected by Wolfram with a little code tinking,
>>> because "transpose" is one of the well-defined operators in matrix
>>> theory, so the average user expects Transpose to work on a MatrixForm
>>> as well as on a List.
>>>
>>> Harold
>>>
>>> nma124 at hotmail.com (steve_H) wrote in message 
>>> news:<bruqrt$t0p$1 at smc.vnet.net>...
>>>> hello
>>>>
>>>> Mathematica 5.0
>>>>
>>>> m = { {1, 2, 3}, {4, 5, 6} } // MatrixForm
>>>> Transpose[m]
>>>>
>>>> this just does nothing. it simply prints back what I typed with
>>>> m in MatrixForm but does not actually do the transpose.
>>>>
>>>> But when I do
>>>>
>>>> m = { {1, 2, 3}, {4, 5, 6} }
>>>> Transpose[m]
>>>>
>>>>
>>>> it works.
>>>>
>>>> It seems that the function Transpose does not like to accept a
>>>> list in 'MatrixForm' ?
>>>>
>>>> I use a MatrixForm to see the matrix better. Does this mean one have
>>>> to removed the MatrixForm each time before calling Transpose?
>>
>>
>




  • Prev by Date: RE: polynomialsorting.html + tensor
  • Next by Date: Re: Compile
  • Previous by thread: Re: Re: Transpose matrix does not work when MatrixForm is used, why?
  • Next by thread: Re: Transpose matrix does not work when MatrixForm is used, why?