MathGroup Archive 2006

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

Search the Archive

Re: Flatten and BlockProcessing


Hi,

Flatten[Map[Flatten , Transpose[M, {1, 3, 2, 4}], 
{2}], 1]

Regards

  Jens

"Maarten van der Burgt" 
<maarten.vanderburgt at icos.be> schrieb im 
Newsbeitrag news:e1fp4f$beo$1 at smc.vnet.net...
| Hallo,
|
| I have a structure M:
|
| M = {{{{a, b}, {e, f}}, {{c, d}, {g, h}}}, {{{k, 
l}, {o, p}}, {{m, n}, {q,
| r}}}}
|
|
| M//Dimensions
|
| gives
|
| {2, 2, 2, 2},
|
| (or more general {n1, n2, m1, m2}; M is the 
result of the BlockProcessing
| function from the Image Processing package)
|
| Does anyone know an elegant way of 'flattening' 
M to give
|
| {{a, b, c, d}, {e, f, g, h}, {k, l, m, n}, {o, 
p, q, r}}
|
| with dimensions {4, 4} (or more general {n1*m1, 
n2*m2})?
|
|
| Thanks for your help,
|
|
| Maarten
| 



  • Prev by Date: A conditional random number generation problem (please help me!)
  • Next by Date: Re: Help with functions
  • Previous by thread: Re: Flatten and BlockProcessing
  • Next by thread: Re: Flatten and BlockProcessing