Use Simulink® to model algorithms and physical systems using block diagrams. You can model linear and nonlinear systems, factoring in real-world phenomena such as friction, gear slippage, and hard stops.
You can design your models to be hierarchical by organizing groups of blocks into subsystems. This approach enables you to build discrete components that reflect your real-life system and simulate the interaction of those components.
Considering system design requirements early can reduce the number of errors found later in the design process. For an example of iterative design, see Basic Modeling Workflow.
Use Simulink for Model-Based Design, where a system model is at the center of the development process, from requirements development, through design, implementation, and testing.