pick out consecutive large values only once

Version 1.0.2 (6.19 KB) by Jitong Ding
This code identifies large absolute values within a series. Notably, it selects only the middle value for consecutive large values in a row.
5 Downloads
Updated 14 May 2024

View License

This code identifies significant absolute values within a series and further classifies them as positive or negative. Notably, it selects only the middle value for consecutive large values. For instance, given consecutive large value indices like [6, 7, 8, 9, 10], the algorithm chooses only index [8].
There are two code snippets: 'MAIN_large_values.m' and 'get_large_values.m', along with a dataset 'all_events_array.mat'. To execute the code, place all files in the same folder. Open 'MAIN_large_values.m' and run it from the editor. The resulting plot resembles the one in the avatar, with positive large values indicated by red arrows and negative ones by blue. Notably, for consecutive large values, only the middle one is selected.
To capture every large absolute value, you can modify 'get_large_values.m' as instructed in the comments.

Cite As

Jitong Ding (2024). pick out consecutive large values only once (https://www.mathworks.com/matlabcentral/fileexchange/165886-pick-out-consecutive-large-values-only-once), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.2

changed the description

1.0.1

Updated the dataset.

1.0.0