MathGroup Archive 2009

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

Search the Archive

Re: MatrixForm affects values instead of only printing ?????

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100358] Re: MatrixForm affects values instead of only printing ?????
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 1 Jun 2009 07:13:14 -0400 (EDT)
  • References: <gvtmh7$ggc$1@smc.vnet.net>

Hi,

your test2 is

MatrixForm[{-3,7,5}]

and MatrixForm[] must change the expression because
it wrap arround the expression.

Just read the manual :-)

Regards
   Jens

summer wrote:
> Here is the example:
> 
> test1={-3, 7, 5}
> test1[[3]]
> 
> returns the list and 5 as expected;
> 
> test2={-3, 7, 5}//MatrixForm
> test2[[3]]
> 
> returns a column vector and error: "part 3 of blah blah doesn't exist". The actual list itself is test2[[1]]. To get the right 3rd element I have to do:
> 
> test2[[1,3]]
> 
> which returns 5 as expected.
> 
> 
> The problem is MatrixForm is NOT supposed to change the expression it is applied on according to the manual. Is that a bug or there's logical explanation?
> 


  • Prev by Date: Re: String as a variable name
  • Next by Date: Re: MatrixForm affects values instead of only printing ?????
  • Previous by thread: Re: Re: String as a variable name
  • Next by thread: Re: MatrixForm affects values instead of only printing ?????