Neural Network Toolbox Previous page   Next Page

Simulation (sim)

The function sim simulates a network. sim takes the network input p, and the network object net, and returns the network outputs a. Here is how you can use sim to simulate the network we created above for a single input vector:

(If you try these commands, your output may be different, depending on the state of your random number generator when the network was initialized.) Below, sim is called to calculate the outputs for a concurrent set of three input vectors. This is the batch mode form of simulation, in which all of the input vectors are placed in one matrix. This is much more efficient than presenting the vectors one at a time.


Previous page  Fundamentals Training Next page

© 1994-2005 The MathWorks, Inc.