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

MathGroup Archive 2011

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

Search the Archive

Re: Help with Delete cases

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116256] Re: Help with Delete cases
  • From: Chris Degnen <degnen at cwgsy.net>
  • Date: Tue, 8 Feb 2011 05:08:09 -0500 (EST)
  • References: <iiojml$gip$1@smc.vnet.net>

On Feb 7, 11:05 am, KenR <ramsey2... at msn.com> wrote:
> I have a list= Range[3003]  I want to delete cases of n = m(m+1) mod P
> from the list, but Delete cases only deletes cases matching a pattern,
> i.e.
>
> list = DeleteCases[list,Mod[N - m(m+1)/2,P] = 0] will definitely not
> work.  I want to keep list, as the same identifier, throughout since
> this is within a looping process. Any suggestions?


You can use something of this form:

DeleteCases[Range[10], _?((# + 1)/2 == 4 &)]

or use Select:

Select[Range[10], (# + 1)/2 != 4 &]



  • Prev by Date: Re: Hi
  • Next by Date: Re: Help with Delete cases
  • Previous by thread: Help with Delete cases
  • Next by thread: Re: Help with Delete cases