function [y,a,c,sig,w]=rbf_output_centros(InpPat,TarPat, c) [m,n]=size(InpPat); n_cent=length(c); x_min=min(InpPat); x_max=max(InpPat); d_max=0; for i=1:n_cent for j=i+1:n_cent d=norm(c(i,:)-c(j,:)); if d>d_max d_max=d; end end end sig=d_max/sqrt(2*n_cent); for i=1:n_cent a(:,i)=rbf(c(i,:),sig,InpPat)'; end; w=pinv(a)*TarPat; y=a*w;