Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: How to work with In?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114002] Re: How to work with In?
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Sat, 20 Nov 2010 06:14:00 -0500 (EST)
  • References: <ic5ibq$3vp$1@smc.vnet.net>

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?