MathGroup Archive 1999

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

Search the Archive

Re: Element extraction

  • To: mathgroup at
  • Subject: [mg19645] Re: [mg19579] Element extraction
  • From: "Wolf, Hartmut" <hwolf at>
  • Date: Tue, 7 Sep 1999 00:28:38 -0400
  • Organization: debis Systemhaus
  • References: <>
  • Sender: owner-wri-mathgroup at

Mark Lawrence Storch schrieb:
> Hello,
>     I am having a bit of trouble trying to extract elements out of
> nested lists.  I have an X x Y array where each element of the array is
> a 3x3 matrix.  I am trying to make density plots of each component.  For
> example, I would like to plot the 1,1 components of each element of the
> larger array.  I have tried the following:
> Array[g[[i,j][[a,b]],{i,Dimensions[g][[1]]},{j,Dimensions[g][[2]]}]
> where I am trying to get the a,b component
> This does not work, and I am not seeing exactly why not.  I am hoping
> someone can point out my error or suggest a way to extract the lists I
> need.

Hello Mark,

perhaps what you need is

   Map[#[[m, n]] &, data, {2}]


m[i_, j_] := Table[Sin[(x i^2 + y j^2  )2Pi/5], {x, -1, 1}, {y, -1, 1}]
data = Array[m, {25, 30}];
gra = Table[
      ListDensityPlot[Map[#[[i, j]] &, data, {2}], 
        DisplayFunction -> Identity], {i, 3}, {j, 3}];
Show[GraphicsArray[gra], DisplayFunction -> $DisplayFunction]

...then you'll see a 3 X 3 array of Density Graphics (with 25 x 30
Pixels each)

Kind regards, hw

  • Prev by Date: Re: crystal structure?
  • Next by Date: Re: Re: Langford's Problem (another solution improved)
  • Previous by thread: Element extraction
  • Next by thread: Re: Element extraction