MathGroup Archive 1994

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

Search the Archive

Re: Mutiple delete in lists

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg376] Re: [mg360] Mutiple delete in lists
  • From: wmm at chem.wayne.edu (Martin McClain)
  • Date: Wed, 28 Dec 94 17:29:29 EST

The position specifier for 2 and 3 in the list {1,2,3,4,5} is {{2},{3}}.  I
just tried it:

In[158]:=
Delete[{1,2,3,4,5},{{2},{3}}]
Out[158]=
{1, 4, 5}

The statement in 1.8.6 could be a little clearer, but if you read it in
literal WRIspeak, it is correct.

Regards-  Martin McClain

>According to the Mathematica book 1.8.6 the command:
>
>		Delete[{1,2,3,4,5},2] 
>
>
>will produce 
>
>		{1,3,4,5}
>
>and:
>
>		Delete[{1,2,3,4,5},{2,3}]]
>should produce 
>
>		{1,4,5}
>		
>but I get the error message:
>
>		Delete::part: Part {2, 3} of {1, 2, 3, 4, 5} does not exist.
>
>I am using V. 2.2 on NeXT.
>
>Thanks,
>
>---
>Gottfried Mayer-Kress
>Center for Complex Systems Research, Beckman Institute, Physics Dept. UIUC
>405 N Mathews,  Urbana, Il 61801,gmk at pegasos.ccsr.uiuc.edu, gmk at igc.apc.org,
>gmk at santafe.edu, (217)-244-5877(voice/fax1),x8371(fax2), x1994 (msg)
>URLs:	http://www.santafe.edu/~gmk/, ftp://ftp.santafe.edu/pub/gmk
>	http://www.ccsr.uiuc.edu/~gmk/
>
>Warranty: None of our calculations were done on a Pentium chip!



  • Prev by Date: Re: Suggestions needed for Mathematica course
  • Next by Date: Re: Mutiple delete in lists
  • Previous by thread: Mutiple delete in lists
  • Next by thread: Re: Mutiple delete in lists