No BSD License  

Be the first to rate this file! 12 Downloads (last 30 days) File Size: 648 Bytes File ID: #21254
image thumbnail

double_thresh

by

 

28 Aug 2008 (Updated )

Function for a simple hysteretic Schmidt trigger on a vector

| Watch this File

File Information
Description

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');

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us