MathGroup Archive 2010

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

Search the Archive

Re: How to work with In?


Am 19.11.2010 11:08, schrieb kj:
> I want to create a list consisting of the (unevaluated) expressions
> that were entered in a particular subrange of the In array.  I.e.,
> what I want is (almost) something like this:
> 
> Table[In[i], {i, 300, 375}]
> 
> except that this won't work, because each In[i] will be evaluated.
> This also fails
> 
> Table[Hold[In[i]], {i, 300, 375}]
> 
> because now the i is not evaluated, so the result is a list of
> multiple copies of the expression Hold[In[i]].
> 
> How can I do what I'm trying to do?

one possibility:

Table[With[{i = i}, Hold[In[i]]], {i, 300, 375}] /. DownValues[In]

hth,

albert



  • Prev by Date: Re: Q on SparseArray representation
  • Next by Date: Combining VectorPlot3D and ParametricPlot3D
  • Previous by thread: Re: How to work with In?
  • Next by thread: Re: How to work with In?