Upon some research I found two functions in MATLAB to do the task:
cvpartitionfunction in the Statistics Toolboxcrossvalindfunction in the Bioinformatics Toolbox
Now I’ve used the cvpartition to create n-fold cross validation subsets before, along with the Dataset/Nominal classes from the Statistics toolbox. So I’m just wondering what are the differences between the two and the pros/cons of each?
Expanding on @Mr Fooz’s answer
… isn’t it true that you can always simulate a leave-M-out using kfold cross validation with an appropriate k value (split data into k fold, test on one, train on all others, and do this for all folds and take average) since leave-one-out is a special case of kfold where k=number of observations?