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.
|On this page…|
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:
Upon running the model, the Simulink position data for the ball is mapped to a Test Variable.
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.
Use the systemtest function to open the test.