Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #15594

Re: Help with Delete cases

From Chris Degnen <degnen@cwgsy.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Help with Delete cases
Date 2011-02-08 10:08 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <iir4m2$6p2$1@smc.vnet.net> (permalink)
References <iiojml$gip$1@smc.vnet.net>

Show all headers | View raw


On Feb 7, 11:05 am, KenR <ramsey2...@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 &]

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Help with Delete cases Chris Degnen <degnen@cwgsy.net> - 2011-02-08 10:08 +0000

csiph-web