Re: Difference table via DifferenceDelta[ ]. Why do I need two Table[ ] calls?

• To: mathgroup at smc.vnet.net
• Subject: [mg121172] Re: Difference table via DifferenceDelta[ ]. Why do I need two Table[ ] calls?
• From: "Alexey Popkov" <lehin.p at gmail.com>
• Date: Fri, 2 Sep 2011 03:29:15 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <j3l6l1\$d81\$1@smc.vnet.net>
• Reply-to: "Alexey Popkov" <lehin.p at gmail.com>

```Christopher,

Definition[DifferenceDelta]
Out[2]= DifferenceDelta :=

The need for Evaluate in your code is an inconsistency: such code should
work well without beating the HoldAll attributes of Table. And error
messages when your code is evaluated without Evaluate clearly show very bad
design of this function. I recommend do not rely on such functions.

As for why you have to evaluate your code twice, you may be interested in
http://stackoverflow.com/questions/5649379/why-do-i-have-to-evaluate-this-twice

Alexey

----- Original Message -----
From: "Christopher O. Young" <cy56 at comcast.net>
Newsgroups: comp.soft-sys.math.mathematica
Sent: Wednesday, August 31, 2011 3:41 PM
Subject: [mg121172] Difference table via DifferenceDelta[ ]. Why do I need two Table[ ]
calls?

> The following gives me a difference table for x^3, but it would be nice if
> I
> could do it with only 1 Table call.
>
> Grid[
> Table[
>  Table[
>    DifferenceDelta[x^3, {x, n}] // Evaluate,
>   {x, -6, 6 - n + 1}
>   ]
>  , {n, 1, 3}
>  ],
> Alignment -> Right
> ]
>
> The following hangs up, though. I have to abort it after several minutes
> of
> nothing happening.
>
> Table[
> DifferenceDelta[x^3, {x, n}] // Evaluate,
> {x, -6, 6},
> {n, 1, 3}
> ]
>
> Any help appreciated.
>
> Chris Young
> cy56 at comcast.net
>
>
>

```

• Prev by Date: Re: Difference table via DifferenceDelta[ ]. Why do I need two Table[ ] calls?
• Next by Date: Re: ODE system - shooting for a terminal point
• Previous by thread: Re: Difference table via DifferenceDelta[ ]. Why do I need two Table[ ] calls?
• Next by thread: Re: Difference table via DifferenceDelta[ ]. Why do I need two Table[ ] calls?