MATLAB: Prediction by using newff

codenewffnntool

Hi I have the input data of 191×4 and out put of 191×1,i train my network with newff with 2 hidden layers. Now i have another input set haveing 4×4 without output,how can i get teh outputs with respect to the train neywork on the previous data. I solved this problem by using nntool,but i wnat to solve this by newff. I try sim command but it does not work. Regards Afaq Ahmad

Best Answer

Hello,
If I understand your question correctly, you would like to know how you can compute the output when an input is applied to a trained network.
Suppose "net" is the neural network you have trained, you could compute the output for an input "X" to the neural network "net" using the following command
y = net(X);
For an example, please see the code snippet below
[X,T] = vinyl_dataset;
net = feedforwardnet(10);
net = train(net,X,T);
y = net(X);
Hope this helps !
Thanks
Vinod