probably a stupid question: MatLab equivalent of "diff" ?

Marcus Goldfish magoldfish at gmail.com
Fri Dec 29 15:21:20 EST 2006


On 12/29/06, Stef Mientki <S.Mientki-nospam at mailbox.kun.nl> wrote:
>
> Does anyone know the equivalent of the MatLab "diff" function.
> The "diff" functions calculates the difference between 2 succeeding
> elements of an array.
> I need to detect (fast) the falling edge of a binary signal.
>
> There's derivate function in Python diff,
> but when you use an binary (true/false) input,
> it also detects rising edges.
>
> Probably a stupid question,
> but I still have troubles,
> digging to huge amount of information about Python.
>
> thanks,
> Stef Mientki
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Stef,

Can you provide more context on your use-- are you receiving binary data
sequentially, or do you have a list or array of binary values?  Are you
using numpy/scipy?

Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20061229/6b22f451/attachment.html>


More information about the Python-list mailing list