做的时候:
load training.mat
training = G
load testing.mat
test = G
接着:
>> knnclassify(test.Inp, training.Inp, training.Ltr)
??? Error using ==> knnclassify at 91
The length of GROUP must equal the number of rows in TRAINING.
自从:
>> size(training.Inp)
ans =
40 40 2016
和:
>> length(training.Ltr)
ans =
2016
如何给 knnclassify (TRAINING) 的第二个参数 training.inp 3-D 矩阵,以便行数为 2016(第三维)?