Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11229
| From | Diana Mecum <diana.mecum@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How to swap two elements of a list |
| Date | 2012-08-05 19:00 +0000 |
| Message-ID | <jvmft9$9ot$1@smc.vnet.net> (permalink) |
| References | <jvklja$643$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
***,
Thank you for getting back to me. I had a little difficulty describing what I was trying to do.
I start with a list which begins as follows:
{2,3,4,5,7,8,9,11,13,16,17,19,23,25,27,29,31
Now, I want to swap the 2 with the 4, the 3 with the 8, the 5 with the 9. "2" is the first element of SWAP LIST 1. "4", which I want to swap with "2" is the first element of SWAP LIST 2. "3" is the second element of SWAP LIST 1. "8", which I want to swap with "3" is the second element of SWAP LIST 2. And, so on.
The resulting list is
{4,8,2,9,16,3,5,25,27,7,32,49,64,11,13,81,121
Hope this is more clear.
Diana
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to swap two elements of a list Diana Mecum <diana.mecum@gmail.com> - 2012-08-05 02:25 +0000 Re: How to swap two elements of a list Diana Mecum <diana.mecum@gmail.com> - 2012-08-05 18:59 +0000 Re: How to swap two elements of a list Diana Mecum <diana.mecum@gmail.com> - 2012-08-05 19:00 +0000 Re: How to swap two elements of a list "Nasser M. Abbasi" <nma@12000.org> - 2012-08-05 19:04 +0000 Re: How to swap two elements of a list Ulrich Arndt <ulrich.arndt@data2knowledge.de> - 2012-08-06 08:46 +0000 Re: How to swap two elements of a list Andrzej Kozlowski <akozlowski@gmail.com> - 2012-08-06 08:54 +0000 Re: How to swap two elements of a list Diana Mecum <diana.mecum@gmail.com> - 2012-08-07 07:03 +0000
csiph-web