Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10742
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: case of inconsistent API between Drop and Part? |
| Date | 2012-07-02 09:30 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jsrpnc$d4g$1@smc.vnet.net> (permalink) |
| References | <201206300917.FAA01642@smc.vnet.net> <CAEtRDSekECNrpgxeX+MMY9_m8Le6V6F+2BAow=BOqtuSdM+TiQ@mail.gmail.com> |
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: case of inconsistent API between Drop and Part? "Nasser M. Abbasi" <nma@12000.org> - 2012-07-02 09:30 +0000
csiph-web