Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2009

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

Search the Archive

Re: problem of syntax.

  • To: mathgroup at
  • Subject: [mg104362] Re: [mg104340] problem of syntax.
  • From: "David Park" <djmpark at>
  • Date: Thu, 29 Oct 2009 02:56:36 -0500 (EST)
  • References: <25979305.1256721965091.JavaMail.root@n11>

Hello Julien,

It might be interesting to know how the extra level got on the elements of
the matrix. I suspect you may have used {}, which holds a list, when you
meant to use (), which performs precedence grouping. You can't use {} or []
for precedence grouping in Mathematica. Each type of bracket has its
distinct use.

Here is a matrix with a mistaken additional level on the elements.

(testmatrix = Table[{x[i, j]}, {i, 1, 2}, {j, 1, 2}]) // MatrixForm

This flattens the rows to obtain a regular matrix.

Flatten /@ testmatrix // MatrixForm

David Park
djmpark at  

From: micmac [mailto:julien.derr at] 

Hello everyone,

For some reasons, I have a matrix where each element is itself another
matrix of size one.
How can I transform that in a normal matrix where each element is just the
value ?

I am very confused with mathematica syntax.



View this message in context:
Sent from the MathGroup mailing list archive at

  • Prev by Date: Re: FromAdjacencyMatrix / FromAdjacencyLists - broken?
  • Next by Date: Re: Rotating an Image
  • Previous by thread: Re: problem of syntax.
  • Next by thread: Re: problem of syntax.