MathGroup Archive 1997

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

Search the Archive

Re: Complement


Complement[{5, 4, 3, 2, 1}, {1, 2}]

{3,4,5}

sameOrderComplement[eall_, ei__] :=
	Sort[Complement[eall, ei], 
	Position[eall, #1][[1, 1]] < 
	Position[eall, #2][[1, 1]]&]

sameOrderComplement[{5, 4, 3, 2, 1}, {1, 2}]

{5,4,3}

sameOrderComplement[{5, 4, 3, 2, 1}, {1, 2}, {1, 4}]

{5,3}

sameOrderComplement[{5, 4, 3, 6, 3, 2, 1}, {1, 2}]

{5,4,3,6}


  • Prev by Date: Progress in NonlinearFit
  • Next by Date: Re: Complement
  • Previous by thread: Progress in NonlinearFit
  • Next by thread: Re: Complement