<br><div><span class="gmail_quote">On 12/29/06, <b class="gmail_sendername">Stef Mientki</b> <<a href="mailto:S.Mientki-nospam@mailbox.kun.nl">S.Mientki-nospam@mailbox.kun.nl</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Does anyone know the equivalent of the MatLab "diff" function.<br>The "diff" functions calculates the difference between 2 succeeding<br>elements of an array.<br>I need to detect (fast) the falling edge of a binary signal.
<br><br>There's derivate function in Python diff,<br>but when you use an binary (true/false) input,<br>it also detects rising edges.<br><br>Probably a stupid question,<br>but I still have troubles,<br>digging to huge amount of information about Python.
<br><br>thanks,<br>Stef Mientki<br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div>Stef,<br><br>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?
<br><br>Marcus<br>