Specific change points in large dataset
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone. I am new to matlab and trying to solve an assignment.
![data_mat.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/243163/data_mat.jpeg)
I am trying to find the points (green circles).
I have tried using
z = ischange(df_10s_ufreq,'linear', 'MaxNumChanges',5);
z_index = find(z);
I could not get to the exact positions and it is also taking 2~3 minutes.
I am in search of better solutions and I will be thankful for the help.
0 Kommentare
Antworten (1)
prasanth s
am 17 Okt. 2019
Here is one of the methods using 'diff' function.
use following code to get all the difference values and plot those values to findout an limit value to cut the lowermost spike.
D=diff(df_10s_ufreq);
figure,plot(D);
Let we take the limit value '-0.5e-5'.
use following code to get all indices below the limit value.
L=D<(-0.5e-5);
Again apply 'diff' and find initial change of spike. it will return desired indices.
V=diff(L);
indices=find(V>0)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!