Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = linspace(-10, 10);
- y = x.^3 - 8*x.^2;
- pNS = linspace(-10, 10, 200);
- tNS = pNS.^3 - 8*pNS.^2;
- net1 = newff(pNS, tNS, 6, {'tansig' 'purelin'});
- net1.trainParam.epochs = 500;
- net1 = train(net1, pNS, tNS);
- y1 = sim(net1, pNS);
- plot(pNS, y1,'o', pNS, tNS, '+')
- grid on;
- e = abs(y1 - tNS);
- plot(e)
- figure;
- %plot(x, y, 's')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement