Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4087 > unrolled thread
| Started by | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| First post | 2011-07-30 11:20 +0000 |
| Last post | 2011-07-30 11:20 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [Mathematica] special iterator Heike Gramberg <heike.gramberg@gmail.com> - 2011-07-30 11:20 +0000
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Date | 2011-07-30 11:20 +0000 |
| Subject | Re: [Mathematica] special iterator |
| Message-ID | <j10pdu$prc$1@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 top | Article view | comp.soft-sys.math.mathematica
csiph-web