Threshold crossing deletion
Version 1.0.1 (1.52 KB) by
Luke Jenkins
Threshold crossing deletion: deletes (makes nan) all bar the max value for every group of consecutive values over a threshold.
Easily editable for actual deletion instead of making nan, or for getting min of each group etc etc...
% thresh_cross_del - for every group of consecutive values over a threshold, all but the max in the group are deleted (made nan)
%
% Inputs:
% var - data for the calculation
% threshold - threshold to calculate groups from
%
% Outputs:
% var_tcd - variable with group data deleted bar the max values
Cite As
Luke Jenkins (2026). Threshold crossing deletion (https://www.mathworks.com/matlabcentral/fileexchange/163516-threshold-crossing-deletion), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2024a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
