# discontinuity detection for discrete values

Discussion in 'MATLAB' started by Hussam Hseiki, Sep 26, 2006.

1. ### Hussam HseikiGuest

Dear All,
I need to know how to detect discontinuities in a series of discrete
set of values. For example, if I have the following series: 1, 2, 3,
10, 5, 6... Then there is a discontinuity at the 4th item. Or if I
have this series: 1, 4, 9, 100, 25, 36... Then also there is a
discontinuity at the 4th item. I tried the MATLAB wavelet toolbox
that detect discontinuities but for continuous signals and not for
discrete sets. So, I need to find the discontinuity for any series.
If there is an option in wavelets to do this or anyone has done this

Hussam Hseiki, Sep 26, 2006

2. ### JérômeGuest

Hi,

try this :

M=[1 2 3 10 5 6]
find(sign(diff(M))==-1)

M=[1 4 9 100 25 36]
find(sign(diff(M))==-1)

Jérôme

Jérôme, Sep 26, 2006

3. ### HussamGuest

Thanks for help but that was not what I was searching for since if
the matrix was like this:[ 1 4 9 10 25 36 ] then the diff function
wouldn't be affected and a discontinuity had really happened.
Another thing, I have to find the discontinuity with a certain
threshold that is variable from a series and other.

Hussam, Sep 26, 2006
4. ### Maarten van ReeuwijkGuest

Somehow you will need to generate the unperturbed series. If this can be any
type of series then you will have a lot of work to look forward to.
Hopefully however, this will not be the case and you only have a moderate
number of types you are willing to consider. You can define 'generators'
for these series and sees which one matches best. By comparing the best
match to your data, the deviations are straightforward.

HTH, Maarten

Maarten van Reeuwijk, Sep 26, 2006