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 smc.vnet.net
  • Subject: [mg104367] Re: [mg104340] problem of syntax.
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 29 Oct 2009 02:57:33 -0500 (EST)
  • Reply-to: hanlonr at cox.net

m = {{{1}, {2}, {3}}, {{4}, {5}, {6}}, {{7}, {8}, {9}}};

Flatten /@ m

{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}

m /. {x_?AtomQ} -> x

{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}


Bob Hanlon

---- micmac <julien.derr at dal.ca> wrote: 

=============

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.

thanks,

Julien



-- 
View this message in context: http://www.nabble.com/problem-of-syntax.-tp26086236p26086236.html
Sent from the MathGroup mailing list archive at Nabble.com.




  • Prev by Date: Re: problem of syntax.
  • Next by Date: Plot3d causes crash with radeon driver and Debian testing
  • Previous by thread: Re: problem of syntax.
  • Next by thread: Re: problem of syntax.