Find a position of last changing value in array
2 views (last 30 days)
Show older comments
Hello,
i'm looking for function that detect a position of detection of last changing value (value stay constant or have just little changes).
In this case tube_dimension = 37;
I'm realize this in for-loop, but maybe thereare better way?
Sensivity_old = Sensivity;
TP ...
FN ....
Sensivity = (TP ./ (TP + FN));
if (Sensivity > Sensivity_old + 1.0e-03)
Sencivity_end = tube_cnt;
else
end
disp(Sencivity_end)
Thank you!
0 Comments
Accepted Answer
Umair Hassan
on 7 Jun 2020
Edited: Umair Hassan
on 7 Jun 2020
Hi Nikita,
You can use MATLAB's built in function differentrial (diff) to find out the minimum variability points of your data. The first index of the those points would be where your data would have the plateau. If you can attach some data, I would give you a code as well, otherwise psuedo code is:
plateau_points=diff(sensitivity);
plateau_points=find(plateau_points ==0) % finding where the points have 0 change
plateau_tube_dimension=tube_dimension(plateau_points(1));
Hope this helps,
Thanks!
More Answers (0)
See Also
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!