Re: A list element replacement.

• To: mathgroup at smc.vnet.net
• Subject: [mg50908] Re: A list element replacement.
• From: Bill Rowe <readnewsciv at earthlink.net>
• Date: Mon, 27 Sep 2004 00:42:17 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```On 9/26/04 at 5:31 AM, rgwv at rgwv.com (Robert G. Wilson v) wrote:

>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.

In comparing what list 1 was to what it became, I see it started with 9 elements and finished with 8 elements, 3 was dropped, 9 became 2 and 1 became 4. Is this what you meant to show? It doesn't seem consistent with what you wrote.

If it is what you meant, what criteria is being used to determine which of (9,3,1} is dropped vs replaced with one of the elements of {2,4}? And what criteria is used to specify which of {2,4} is used to replace the numbers to be replaced?
--
To reply via email subtract one hundred and four

```

• Prev by Date: Export to file
• Next by Date: problem with very slow matrix function
• Previous by thread: A list element replacement.
• Next by thread: Re: A list element replacement.