summaryrefslogtreecommitdiff
path: root/1332/CH22/EX22.5/22_5.sce
blob: bfc474112b1f33761b438044f718a0c82d3abbab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Example 22.5
//RBF Network
//Page no. 773
clc;clear;close;

deff('y=f(x)','y=10*sin(x)')
printf('Input\t\tDesired\t\tNetwork\t\tError\n\t\t Output\t\t Output\n---------------------------------------------------------\n')
in=[0.7053,0.7060,0.7097,1.5056,1.5103,1.5377,2.2481,2.2514,2.2599,3.7076,3.7229,3.7364,5.0002,5.0022,5.0028,6.3749,6.3799,6.3886]
n=[6.4828,6.4883,6.5164,9.9786,9.9816,9.9944,7.7926,7.7718,7.7180,-5.3625,-5.4910,-5.6034,-9.5884,-9.5828,-9.5809,0.9163,0.9663,1.0527]
for i=1:18
    printf(' %.4f\t\t%.4f\t\t%.4f\t\t%.4f\n',in(i),f(in(i)),n(i),f(in(i))-n(i))
end