1 %script creates data and trains the network. It then creates new data and
4 n = input_num('How many samples to create?',10000);
7 %from uniform distribution
9 %from gaussian distribution
10 s = gauss_samps(n, 0.8,0.5);
12 %s(:,1:4) = rotate_cell(s(:,1:4));
15 fprintf('Computing Integrals on data, be patient...\n')
19 fprintf('Now training the network \n')
22 %create new set of data
25 r2 = fuel_quad(s2,50);
28 %use network to evaulate integrals
31 %set outlier values to zero or one
37 %scatter plot of quadrature and network outputs
39 title('Network and integral evaluations')
40 xlabel('Integral values')
41 ylabel('Network values')
43 %histogram of differences
46 title('Integral - Network')
50 fprintf('Maximum absolute difference is %f \n',max(abs(d)))
51 fprintf('Mean of difference is %f \n',mean(d))
52 fprintf('Variance of difference is %f \n',var(d))