You can try to employ random selection of the data for training and validation using randperm() or randsample(), for example.
Another approach to address the issue in general is to change the ratio of data for training and validation purposes, e.g. 65% vs. 35%.