MathGroup Archive 2006

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

Search the Archive

Re: List Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67960] Re: [mg67889] List Question
  • From: "Bharat Bhole" <bbhole at gmail.com>
  • Date: Thu, 13 Jul 2006 06:56:26 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Simon,

Assuming that it is always the third and  higher elements that you want to
get rid of the following will work:

If x denotes your list (of lists), then,

f[x_]:=Take[x,2]
Map[f,x]

Bharat.

On 7/12/06, Simon Bale <simonjbale at gmail.com> wrote:
>
> Hi,
>
> I have a list with the following structure:
>
> {{x1,y1},{x2,y2},{x3,y3,z3},{x4,y4}...}
>
> As you can see some of the data points have three elements. I would
> like to remove these z elements so that the list has a structure
> {{x1,y1},{x2,y2},{x3,y3},{x4,y4}...}. I'm not sure how to achieve this
> so any
> help is greatly appreciated.
>
> Regards, Simon Bale.
>
>


-- 
----------------------------------------------------------
"No problem can withstand the assault
of sustained thinking."
                                              Voltaire
----------------------------------------------------------


  • Prev by Date: ListIntegrate
  • Next by Date: which polynomial interpolant is good for CDFrepresentation
  • Previous by thread: Re: List Question
  • Next by thread: Question on using Table in module