funcction used to set two diffrent limmits , upper limits and lower limits. and values below or equal to lower limit are set to zero and continues to be zero even is beyond the lower limit, the state is changed to 1 when in touch the upper limit and continues to 1 until it touches the lower limit.
jamali omary (2020). schmitt trigger (https://www.mathworks.com/matlabcentral/fileexchange/44419-schmitt-trigger), MATLAB Central File Exchange. Retrieved .