Advertisement
Nikitka_36

НС дома

Mar 19th, 2015
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.40 KB | None | 0 0
  1. clear;
  2. p =[1 3 2 3 2 1;
  3.         1 5 3 5 3 1;
  4.         1 5 3 2 4 2;
  5.         1 3 2 2 3 2;
  6.         1 3 2 3 2 3];
  7.  t = [180 620 400 520 460 360]./1000;
  8.  ptest=[1 2 1 3 1;
  9.         3 2 1 3 3]'
  10.  
  11.  
  12.  net = newff(minmax(p), [2 1], {'purelin' 'purelin'});
  13.  net.trainParam.epochs = 500;
  14.  net = train(net, p, t);
  15.  
  16.  y = sim(net, p)
  17.  y - t
  18.  axis equal;
  19.  plot(p, y,'o', p, t, '+')
  20.  sim(net, ptest).*1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement