MathGroup Archive 2012

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

Search the Archive

Re: case of inconsistent API between Drop and Part?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127144] Re: case of inconsistent API between Drop and Part?
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Mon, 2 Jul 2012 05:27:43 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201206300917.FAA01642@smc.vnet.net> <CAEtRDSekECNrpgxeX+MMY9_m8Le6V6F+2BAow=BOqtuSdM+TiQ@mail.gmail.com>
  • Reply-to: nma at 12000.org

On 6/30/2012 11:20 PM, Bob Hanlon wrote:
> To drop elements 2 and 4 in one command:
>
> lis = {a, b, c, d, e};
>
> Drop[lis, {2, 4, 2}]
>
> {a, c, e}
>
>

I knew someone will say that :)

But that is clearly not what I am asking, as it is not
a general solution. It is using a special case of

"Drop[list,{m,n,s}]
gives list with elements m through n in steps of s dropped"

which is clearly not a general solution. I happend to have
asked using an example which allows this in this one case only.

Ok, here is the question again:

Use one call to Drop to remove only elements

       2,3,7,11, and 12

from

lis={q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m}

regards,
--Nasser



  • Prev by Date: Solid modeling using Manipulate
  • Next by Date: Re: Higher precision in Error function Erf[] needed.
  • Previous by thread: Re: case of inconsistent API between Drop and Part?
  • Next by thread: Re: case of inconsistent API between Drop and Part?