Using Simulink Previous page   Next Page

Working with Block Parameters

Every Simulink block has a set of attributes, called parameters or properties, that govern its appearance and its behavior during simulation. Some types of attributes are common to all blocks. For example, all blocks have a block name attribute. Other attributes are specific to a particular type of block. For example, only Gain blocks have a Gain parameter. Simulink allows you to specify values for many of a block's attributes, thus enabling you to customize the block's appearance or behavior to fit the requirements of a particular application.

Simulink provides the following means for specifying block parameters:

Displaying a Block's Parameter Dialog Box

You can also display a block's parameter dialog box by double-clicking it in the model or library window.

You can also display a block's parameter dialog box by selecting the block in the model's block diagram and choosing BLOCK Parameters from the model window's Edit menu or from the model window's context (right-click) menu, where BLOCK is the name of the block you selected, e.g., Constant Parameters.

Specifying Parameter Values

You can use a MATLAB constant, model or base workspace variable, or expression that evaluates to a numerical value to specify the value of a numeric parameter. If the value is the name of a workspace variable or MATLAB expression, Simulink evaluates the variable or expression when it compiles the model to determine the parameter's value. If the variable is not defined in the model or MATLAB workspace or the expression uses variables that are not defined in the model or MATLAB workspace, Simulink halts the compilation and displays an error message.


Previous page  Moving Blocks in a Model Working with Tunable Parameters Next page

© 1994-2005 The MathWorks, Inc.