I have successfully trained an RBF network using two layers and I can readily get the weights and biases for both layers. Using these weighs and bias values I want to reproduce the network to track the values of the inputs at various stages. Unlike In MLP, I can't seem to find any means to generate the code for the trained network. So far what I have done are as follows.
note: Before training the RBF with newrb I normalized the inputs and outputs between 0.1 to 0.9.
iw=cell2mat(net.iw(1)); %input weight
lw=cell2mat(net.lw(2,1)); %layerweight
ib=cell2mat(net.b(1)); %input bias
lb=cell2mat(net.b(2)); %layer bias
a= radbas(netprod(dist(iw,pn),ib)); %radial basis transfer function
a2=dotprod(net.lw{2,1},a); %product of first layer output with layer weights
a2=gadd(a2,net.b{2}); %add with layer bias
a2=mapminmax('reverse',a2,ts); %reverse the normalization as followed in the newrb which was from 0.1 to 0.9
However I am not getting the a2 outputs equal to the ones I got from net(pn).
Please help me.