Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4087
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: [Mathematica] special iterator |
| Date | 2011-07-30 11:20 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j10pdu$prc$1@smc.vnet.net> (permalink) |
| References | <201107300958.FAA25264@smc.vnet.net> |
With a number of functions such as Do and Table, you can specify the
iteration range in the form {i, {i1,i2,=85}}, so
to iterate over all indices except j you could do something like
Do[ <something>, {i, Drop[Range[Length[myList]], {j}]}
Heike
On 30 Jul 2011, at 10:58, lorenzo wrote:
> Hello everybody,
>
> I would like to define an iterator to explore all the elements in a
list except for the one of index j.
>
> something like:
> {index,0,Length[myList]} and if index == j ---> index++
>
> Is it possible?
> Can I do this without deleting the j-th element?
>
> Thank you very much for helping :)
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: [Mathematica] special iterator Heike Gramberg <heike.gramberg@gmail.com> - 2011-07-30 11:20 +0000
csiph-web