学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
发新话题
打印

plot问题

plot问题

P=[0 1 2 3 4 5 6 7 8 9 10];
T=[0 1 2 3 4 3 2 1 2 3 4]
net=newff([0 10],[5 1],{'tansig' 'purelin'},'traingd','learngd','msereg');
net.trainParam.epochs=200;
net=train(net,P,T);
figure;
Y=sim(net,p);
plot(P,T,P,Y,'o')

??? Error using ==> plot
Vectors must be the same lengths.

Error in ==> Untitled at 8
plot(P,T,P,Y,'o')

TOP

不知能否改变plot坐标使之T Y输出都可以

TOP

又一次验证,发现将sim(net,P)直接代入plot中可以!
怪事!
来个明白人指点一下!

TOP

郁闷!原来是p的问题!

TOP

发新话题