MathGroup Archive 2004

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

Search the Archive

A list element replacement.


HELP please,

I have a list of many elements, some of which are identical, and wish
to 'replace' elements in the first list with elements of a second list
of unequal length.

As an example, list 1 might equal {3, 4, 5, 6, 6, 6, 9, 2, 1} and if the
elements {9, 3, 1} are present in list 1, when replace them with elements
{2, 4}. Thus list 1 would become {4, 5, 6, 6, 6, 2, 2, 4}. I am not
interested in order for I well use Sort at the end for presentation.

Thank you in advance. Bob.


  • Prev by Date: PlotRange-> {0, All}
  • Next by Date: Re: Re: Programing operations with lists
  • Previous by thread: RE: PlotRange-> {0, All}
  • Next by thread: Re: A list element replacement.