How to model "for loop" & "memory things" in Matlab/Simulink
<p>In my undergrad thesis I am creating a neural network to control automated shifting algorithm for a vehicle.</p>

<p>I have created the  nn from scratch starting from .m script which works correctly. I tested it to recognize some shapes.</p>

<p>A brief background information;</p>

<p>NN rewires neurons which are mathematical blocks located in a layer. There are multiple layers. output of a layer is input of preceding layer. Actual output is subtracted from known output and error is obtained by this manner. By using back propagation algorithm which are some algebraic equation the coefficient of neurons are updated. </p>

<p>What I want to do is;</p>

<p>in code there are 6 input matrices, don't have to be matrix just anything and corresponding outputs. lets call them as x(i) matrices and y(i) vectors. In for loop I go through each matrix and vector to teach the network. Finally by using last known updated coeffs networks give some responses according to unknown input.</p>

<p>I couldn't find the way that, how to simulate that for loop in simulink to go through each different input and output pairs. When the network is done with one pair it should change the input and compare with corresponding output then update the coefficient matrices.</p>

<p>I model the layers as given and just fed with one input but I need multiple. 
<a href="https://i.stack.imgur.com/zN9RW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zN9RW.jpg" alt="enter image description here"></a>
When it comes to automatic transmission control issue it should do all this real time. It should continuously read the output and updates the coeffs and gives the decision.</p>