%Radial Basis Function Network
%S. Mandayam/ECE Dept./Rowan University
%Neural Nets/Spring 00
clear;close all;

%generate training data (input and target)
p = [0:0.25:4];
t = sin(p*pi);

%Define and train RBF Network
net = newrb(p,t);
plot(p,t,'*r');hold;

%generate test data
p1 = [0:0.1:4]; 

%test network
y = sim(net,p1);

plot(p1,y,'ob');

legend('Training','Test');
xlabel('input, p');
ylabel('target, t')
