Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Re: TableForm and MatrixForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53679] Re: [mg53654] Re: TableForm and MatrixForm
  • From: DrBob <drbob at bigfoot.com>
  • Date: Sat, 22 Jan 2005 03:52:21 -0500 (EST)
  • References: <200501211136.GAA01413@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

>> This is particularly useful in that I don't have to remember to remove the
>> Head MatrixForm before using the results in subsequent computations.

Yes, this is still important in version 5.1, where TableForm and MatrixForm STILL do not act like the wrappers (not affecting computation) that documentation claims they are.

(Execute this, for instance.)
m = TableForm[{{1, 2, 3}, {4, 6, 5}, {9, 8, 7}}];
Transpose@%
Transpose@m

The first output is properly transposed, but the second is not.

I don't like defaulting to TraditionalForm output, however, since it's not hard to come across tables that (a) I don't think of as matrices (even if they're in the right shape), and (b) matrices too large to fit the screen in TraditionalForm.

Bobby

On Fri, 21 Jan 2005 06:36:57 -0500 (EST), Bill Rowe <readnewsciv at earthlink.net> wrote:

> On 1/20/05 at 3:48 AM, jerry.blimbaum at navy.mil (Blimbaum, Jerry AA
> R22) wrote:
>
>> A recent question about outputting the following table as a 3 col
>> matrix
>
>> Table[{Sin[x],Cos[y],Sin[x]*Cos[y]},{y,0,2},{x,0,3}];
>
>> gave 2 responses.....
>
>> Flatten[data,1]//MatrixForm
>
>> Flatten[data,1]//TableForm
>
>> The output of these 2 is quite dissimilar....MatrixForm puts a
>> parentheses around the table and centers the expressions on each
>> line....whereas TableForm doesn't output parentheses nor does it
>> center the expressions on each line.....Is this intentional or an
>> oversight?
>
> Yes, this is intentional. MatrixForm is intended to display a matrix in traditional notation which would include parantheses as you describe. TableForm is intended to present the data in a table and should not add paramtheses
>
>> .....I dont like the parentheses but I dont like the
>> expressions not centered on the column either....
>
> The use TableForm[data, TableAlignments->Center] rather than the postfix form.
>
> Personally, I prefer to have my default output set to TraditionalForm so that a matrix displays with the parantheses automatically without my needing to use MatrixForm. This is particularly useful in that I don't have to remember to remove the Head MatrixForm before using the results in subsequent computations.
> --
> To reply via email subtract one hundred and four
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: NDSolve/InterpolatingFunction and vectors
  • Next by Date: Multiple Sums in Mathematica
  • Previous by thread: Re: TableForm and MatrixForm
  • Next by thread: Re: TableForm and MatrixForm