www.pudn.com > Volterraprediction.rar > TrainTestSample_2.m, change:2005-12-07,size:380b


function [TrainFeature,TrainKnnTarget,...
          TestFeature, TestKnnTarget]...
           = TrainTestSample_2(train_num,FeatureArray,KnnTarget);
% 将特征矩阵前 train_num 个为训练样本,其余为测试样本

TrainFeature = FeatureArray(:,1:train_num);
TrainKnnTarget = KnnTarget(1:train_num);

TestFeature = FeatureArray(:,train_num+1:end);
TestKnnTarget = KnnTarget(train_num+1:end);