MathGroup Archive 2008

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

Search the Archive

Re: Drop elements from list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94307] Re: Drop elements from list
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Wed, 10 Dec 2008 04:46:06 -0500 (EST)
  • References: <ghdmqj$flr$1@smc.vnet.net> <ghlme9$k26$1@smc.vnet.net>

Correcting an omission from my previous post:

On Dec 9, 3:56 am, SigmundV <sigmu... at gmail.com> wrote:
> ... it seems that too much time is spent in Complement.

Here's an adaptation of Carl Woll's "missing" from his July 15, 2005,
post in the thread "Complement replacement":

komplement[n_, list_] := Block[{r = Range@n}, r[[list]] = 0;
           SparseArray[r] /. SparseArray[_,_,_,x_]:>x[[3]]]


  • Prev by Date: Re: NIntegrate of Oscillatory integrand
  • Next by Date: Re: CountryData[ ]
  • Previous by thread: Re: Drop elements from list
  • Next by thread: Re: Drop elements from list