function f=rbf(c,sig,x) % % function f=rbf(c,sig,x) % % This function computes the output of one hidden neuron in a RBF nn. % % Inputs: c - vector of centres, with dimension n % sig - 'desvio padrao' of the neuron % x - input data (m patterns with n inputs) % % Output: f - matrix of outputs (dimension m*n) [m,n]=size(x); for i=1:m sum=0; for j=1:n sum=sum+(c(j)-x(i,j))^2; end sum=sum/(2*sig^2); f(i)=exp(-sum); end