MathGroup Archive 2000

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

Search the Archive

Re: how to differentiate a list?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25963] Re: [mg25940] how to differentiate a list?
  • From: BobHanlon at aol.com
  • Date: Tue, 14 Nov 2000 03:46:56 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 11/10/00 4:12:44 AM, piovere at pdq.net writes:

>I needed to get the derivative of a time varying pulse to do some
>numerical
>operations.  As seen below, the only way I could figure how to do it
>was to generate two lists, shifted by one sample and then subtract them:
>
>***************
>del = 0.002; a = 12\[Pi]; b = \[Pi];
>( s[t] is a function of t defining the pulse )
>
>sd = Table[N[s[t]], {t, 0, 1, del}];
>sd1 = Table[N[s[t]], {t, del, 1 + del, del}];
>diff = sd - sd1;
>****************
>
>I looked all over and I didn't find a list operation available to do
>this. I bet
>you Mathematica gurus know how to do this.  If so, could you enlighten
>me?
>

test = {a, b, c, d, e};

ListConvolve[{1, -1}, test]

{-a + b, -b + c, -c + d, -d + e}


Bob Hanlon


  • Prev by Date: nasty,nasty bug?
  • Next by Date: MathLink
  • Previous by thread: Re: how to differentiate a list?
  • Next by thread: Re: how to differentiate a list?