我试图在 kdd 数据集上调用竞争层,但我得到了这个:
???Error using ==> plot3 Conversion to double from cell is not possible. plot3(p(1,:),p(2,:),p(3,:),'+r');
这是我的代码:
clear all;
p=importdata('kdd train.txt');
tar=[];
for i=0:size(p);
tar=[tar;0 1];
end
net=newc(tar,5,0.1);
w = net.IW{1};
plot3(p(1,:),p(2,:),p(3,:),'+r');
grid on;
hold on;
circles = plot3(w(:,1),w(:,2),w(:,3),'ob');
net.trainParam.epochs = 10;
net = train(net,p);
w = net.IW{1};
delete(circles);
plot3(w(:,1),w(:,2),w(:,3),'ob');
谁能看到导致错误的原因?