Gesture recognition algorithms in MATLAB