how to select some rows(for example row 1 to 5 and then row select 11 to 15 from same matfile) from mat file?
4 次查看(过去 30 天)
显示 更早的评论
I have a mat file having some data 1st column is a class name and rest are their feature vectors (for example format is like that: class featureVector).
1. i want to partition data form mat file X containing classname and feature vector for testing and training like:
trainData= X( 1st row to 5th row;
then 11th row to 15th row;
and then 21th row to 25th row);
testData= X( 6th row to 10th row;
then 16th row to 20th row;
and then 26th row to 30th row);
i-e trainData (select 1. first five rows 1 to 5 and 2. then skip next 5 rows to select 11th to 15th row and 3.then again skip next 5 rows to select 21st to 25th row)
i-e testData (select 1. second five rows 6th to 10th and 2. then skip next 5 rows to select 16th to 25th rows and 3.then again skip next 5 rows to select 21st to 25th row)
how can i do that in matlab? plz help me
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!