Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4706 > unrolled thread

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

Started by"Christopher O. Young" <cy56@comcast.net>
First post2011-09-03 12:03 +0000
Last post2011-09-03 12:03 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Difference table via DifferenceDelta[ ]. Why do I need two Table[ ] calls? "Christopher O. Young" <cy56@comcast.net> - 2011-09-03 12:03 +0000

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

From"Christopher O. Young" <cy56@comcast.net>
Date2011-09-03 12:03 +0000
SubjectRe: Difference table via DifferenceDelta[ ]. Why do I need two Table[ ] calls?
Message-ID<j3t52s$52t$1@smc.vnet.net>
Thanks a lot, using Differences[ ] seems like the way to go here; both
faster and more concise.

On 9/1/11 6:07 AM, in article j3nlgm$p31$1@smc.vnet.net, "Peter Pein"
<petsie@dordos.net> wrote:

> Am 31.08.2011 13:41, schrieb Christopher O. Young:
>> 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@comcast.net
>> 
>> 
> 
> Hi Christopher,
> 
> I would use
> 
> In[1]:= Rest@NestList[Differences, Range[-6, 7]^3, 3]
> 
> Out[1]=
>   {{91, 61, 37, 19, 7, 1, 1, 7, 19, 37, 61, 91, 127},
>    {-30, -24, -18, -12, -6, 0, 6, 12, 18, 24, 30, 36},
>    {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}}
> 
> to get the values.
> 
> Peter
> 

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web