How can plote continous line to clear the matching between predictions and real outputs points in same figure by MATLAB
1 次查看(过去 30 天)
显示 更早的评论
Hi , i have NN for prediction points,
i need draw line in the results showing how much the prediction points matching the real points,
wrote the code, but provide me just points without continuous line!
please help me !
clear all;
%%%%%%%%%%%%%%%%%%% normlaized
p1=xlsread('diffrentnorm.xlsx',1,'A1:B7000') ;
t1=xlsread('diffrentnorm.xlsx',1,'C1:C7000') ;
sample=xlsread('diffrentnorm.xlsx',1,'A7010:B7020') ;
t2=xlsread('diffrentnorm.xlsx',1,'C7010:C7020') ;
%% training
net =newcf(p1',t1',10,{'tansig','purelin'},'trainlm');%Cascade-forward neural network,ok
net.divideParam.trainRatio = 0.70; % training set [%]
net.divideParam.valRatio = 0.15; % validation set [%]
net.divideParam.testRatio = 0.15; % test set [%]
% net=init(net);
net.trainParam.epochs=1000;
net.trainParam.max_fail =1000;
net.trainParam.min_grad=1e-09;
[net,tr,Y,E]=train(net,p1',t1');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
predictionvalue = net(sample');
performance = perform(net,t2', predictionvalue);hold all
%%%%%%%%%%%%%%%%%%%%%%%%%%55
figure
t = 0:1:10;
plot(t,t2','*','color','blue')
hold on
plot(t,predictionvalue','+','color','red')
hold off
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!