How to extract training set from dataset?
4 次查看(过去 30 天)
显示 更早的评论
Hello, I've to extract a training set from my dataset 214x11. How can I do? Please help me!
0 个评论
回答(1 个)
Kirby Fears
2015-9-22
If you want to store a subset of your full dataset in memory, like the first 100 rows of the matrix, just use indexing as follows:
% assuming dataset is a 2D array
trainingset=dataset(1:100,:);
This assigns the first 100 rows (for all columns) to the variable "trainingset".
Hope this helps.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Analytics Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!