A list element replacement.
- To: mathgroup at smc.vnet.net
- Subject: [mg50887] A list element replacement.
- From: "Robert G. Wilson v" <rgwv at rgwv.com>
- Date: Sun, 26 Sep 2004 05:31:49 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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.