马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
??? Error using ==> plot
Vectors must be the same lengths.
Error in ==> demogrn1 at 14
plot(P,T,'.')
请问怎样改
以下是程序
P =0:1:200;
T =[0 20 38 54 72 80 90 87 80 70];
plot(P,T,'.')
axis([25 50 100 150 200])
title('Function to approximate.')
xlabel('P')
ylabel('T')
spread = 0.7;
net = newgrnn(P,T,spread);
A = sim(net,P);
hold on
outputline = plot(P,A,'.','markersize',30,'color',[1 0 0]);
title('Create and test a network.')
xlabel('P')
ylabel('T and A')
p = 3.5;
a = sim(net,p);
plot(p,a,'.','markersize',30,'color',[1 0 0]);
title('New input value.')
xlabel('P and p')
ylabel('T and a')
P2 = 0:.1:9;
A2 = sim(net,P2);
plot(P2,A2,'linewidth',4,'color',[1 0 0])
title('Function to approximate.')
xlabel('P and P2')
ylabel('T and A2') |