Split data into 3 sets without repetition
3 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Guillaume
2015-9-17
It sounds like you want to split the rows randomly. Use randperm for that:
dataset = randi([0 255], 20132, 11); %random data for demonstration
rows = randperm(size(dataset, 1));
splitdata{1} = dataset(rows(1:12132), :);
splitdata{2} = dataset(rows(12133:16132, :);
splitdata{3} = dataset(rows(16133:20132, :);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!