To split the dataset of images into train_data, train_labels and test_data, test_labels with separated folders, below given steps might help you in getting started:
Define the split ratio.
Shuffle the image files to ensure random distribution.
%imageFiles is a folder with all the images and labels.
numImages = length(imageFiles);
randomIndices = randperm(numImages);
Split the dataset
trainCount = round(trainRatio * numImages)
Copy the image and label to the destination directory
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.