MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by Nico0789 Mazzi
on 19 Sep 2013

I would like to create using Simulink a closed loop system in which i provide the initial solution to start the simulation and than the model has to do a loop every dt (es. 0.05 s) using the solution of the previous loop. How is it doable?

Answer by A Jenkins
on 19 Sep 2013

Accepted answer

You can feedback your previous result using a delay block or memory block.

The intial condition for either of these blocks can be set by double clicking on it.

Nico0789 Mazzi
on 20 Sep 2013

thank you for the perfect answer! is possible to control the number of loops? for example can I impose the model to do 1 cycle per second?

## 0 Comments