Getting Started with SystemTest Using Simulink

This example shows how to run a Simulink model using different test conditions. The model characterizes a rubber ball being thrown into the air. In order to understand the influence they have on the ball's motion, the model is run using different values for the ball's properties and initial conditions.

Mapping Simulink Data to SystemTest Data

A Simulink element is used to execute the following model for every main test iteration:


When the Simulink element is run, Test Vectors are used to map SystemTest data to the appropriate Simulink block parameter. For this model, there are three block parameters that are assigned every main test iteration:

  • Elasticity

  • Gravity

  • Initial velocity

Upon running the model, the Simulink position data for the ball is mapped to a Test Variable.

Processing Simulink Data

A MATLAB element is used at the end of every main test iteration to compute the maximum peak value for the ball's motion. The computation is then assigned to a Test Variable.

Opening the Test

Use the systemtest function to open the test.


Open the example in the SystemTest desktop.Open the example in the SystemTest desktop.

Was this topic helpful?