Re: transition detection
- From: ellieandrogerxyzzy@xxxxxxxxxxxxxxxxxxxxxx (Roger Stafford)
- Date: Mon, 29 Aug 2005 17:42:38 GMT
In article <ef1260c.-1@xxxxxxxxxxxxxxxx>, jack <noavail@xxxxxxxx> wrote:
> Hello
>
> I was wondering if anyone knows of away in matlab to efficiently
> detect transition as is shown below. The real data included alot of
> noise hence simply taking a derrivative does not work very well.
>
> T = 0 0 1 1 1 0 0 0 2 2 0 1 1 1 1 0 0 0 0
>
> thanks in advance
> Jack
-------------------
Hello Jack,
You may wish to introduce some degree of "tolerance" in the 'diff'
function in order to deal with noise in T:
i = find(abs(diff(T))>tol);
This would pick up the locations of changes in T greater than the 'tol'
amount, with 'tol' being set in accordance with the amount of noise you
expect in T.
By the way, 'diff', as applied to numerical vectors, does not find
derivatives. It just finds the differences between successive elements.
'diff' only becomes a derivative when applied to symbolic variables in the
Symbolic Math Toolbox.
(Remove "xyzzy" and ".invalid" to send me email.)
Roger Stafford
.
- References:
- transition detection
- From: jack
- transition detection
- Prev by Date: Re: Finding the position of 1 from the left
- Next by Date: Re: XPc Taget From File
- Previous by thread: Re: transition detection
- Next by thread: Re: transition detection
- Index(es):
Relevant Pages
|
Loading