The unity function called on line 137 of bz_FindRipples is not MATLAB native - it belongs to the Dat Toolbox, but this toolbox is not included in the external toolboxes folder of buzcode.
The unity fx used has 3 input arguments, however the unity function in the Dat Toolbox only accepts 1.
Consequence: "restrict" functionality broken - there is no way to restrict determination of signal standard deviation to specific intervals (for example, during non-artificially driven times).