This document contains tutorial for running the codes associated with the method reported in the paper entitled "Metric learning for novel motion rejection in high-density myoelectric pattern recognition", which has been accepted by Knowledge-Based Systems.