double_thresh
No License
This function performs a Schmidt trigger operation on a vector. A Schmidt trigger is a hysteretic thresholding operation, where the state of the trigger will stay low until the signal data crosses above the upperthreshold, then will stay high until it falls below the lowerthreshold.
%example code illustrates how to use the trigger and its benefit over a simple threshold.
signal=sin((0:.01:2*pi));
signal=signal+.2*rand(size(signal));
simplestate=signal>0;
state=double_thresh(signal,.1,-.1);
figure;
hold on;
plot(signal);
plot(simplestate,'g');
plot(state,'r');
Cite As
Forrest Collman (2024). double_thresh (https://www.mathworks.com/matlabcentral/fileexchange/21254-double_thresh), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |