How can I find abrupt changes in a signal in MATLAB 2015b (32bit)?

조회 수: 6 (최근 30일)
Abbas Atefi
Abbas Atefi 2017년 7월 24일
답변: Chad Greene 2017년 7월 24일
Hi,
I need to find abrupt changes in a signal. I found "findchangepts" function in MATALB and it works in MATLAB 2017a (64 bit). For some reason, I should use MATLAB 2015b (32 bit). When I run the function, I got this error "Undefined function or variable 'findchangept'". It seems MATLAB 2015b (32bit) does not have this function. Do we have a similar function which can find abrupt changes in a signal in MATLAB 2015b(32bit)? Or does a way exist to use "findchangepts" function in MATLAB 2015b(32bit)?
I appreciate any help in advance.
Thank you,
Abbas

답변 (1개)

Chad Greene
Chad Greene 2017년 7월 24일
Indeed, findchangepts is a Signal Processing Toolbox function that was introduced in 2016a. If you're simply looking for steps larger than some threshold, you can use diff, which tells you the difference between each element and the one before it. For example,
y = [1 2 3 200 201 200 2 1]
The step sizes using diff are
dy = [0 diff(y)]
dy =
0 1 1 197 1 -1 -198 -1
If you want to find every step bigger than 100,
changepoints = find(abs(dy)>100)
changepoints =
4 7
The fourth and seventh elements in y jumped or dropped by a magnitude of more than 100.

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by