Variable Initialization

Initialize block variables prior to simulation and verify results

Examples and How To

Set Priority and Initial Target for Block Variables

When you open the Variables tab of a block dialog box, it lists all the public variables specified in the underlying component file, along with priority, beginning (target) value, and unit.

Initialize Variables for a Mass-Spring-Damper System

This example shows how to use block variable initialization, and how it affects the simulation results of a simple mechanical system.


About Variable Initialization

Principles of initializing variables; specifying target values and setting priority

Variable Viewer

Prior to simulating the model, you can use the Variable Viewer to check the results of the initial conditions computation for the model and to see which of the block-level variable initialization targets have been satisfied.

Was this topic helpful?