帮助中有详细的说明
[Train, Test] = crossvalind('LeaveMOut', N,M), where M is an integer, returns logical index vectors for cross-validation of N observations by randomly selecting M of the observations to hold out for the evaluation set. M defaults to 1 when omitted. Using LeaveMOut cross-validation within a loop does not guarantee isjointed evaluation sets. Use K-fold instead.