Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: complicated list selector

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98486] Re: complicated list selector
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 10 Apr 2009 04:59:15 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <grkgld$6a6$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

{#[[1]], #[[2, 2]]} & /@ data

Regards
   Jens

summer wrote:
> I have the following list
> 
> data = {  {11, {121, 122}},   {21, {221, 222}},  {31, {321, 322}} };
> 
>>From each sublist, I want to extract the first element and the second element of the second sub-sub-list that is:
> 
> wanted_result={  {11, 122},   {21, 222},   {31, 322}   }
> 
> I tried 
> 
> data[[All, {1, {2,1}}]] 
> 
> but it gives me error.
> 
> What is the right selector ?
> 


  • Prev by Date: Re: Plotting 3d-mesh files / Isosurfaces
  • Next by Date: Re: complicated list selector
  • Previous by thread: Re: complicated list selector
  • Next by thread: Re: complicated list selector