MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: [Mathematica] special iterator

  • To: mathgroup at
  • Subject: [mg120606] Re: [Mathematica] special iterator
  • From: Heike Gramberg <heike.gramberg at>
  • Date: Sat, 30 Jul 2011 07:19:49 -0400 (EDT)
  • Delivered-to:
  • References: <>

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}]}


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 :)

  • Prev by Date: Re: FinancialData errors
  • Next by Date: Re: extra lines in framed plots?
  • Previous by thread: [Mathematica] special iterator
  • Next by thread: Re: special iterator