| Simulink Reference | ![]() |
Check whether a signal is nonzero
Library
Description
The Assertion block checks whether any of the elements of the signal at its input is nonzero. If any element is nonzero, the block does nothing. If any element is zero, the block halts the simulation, by default, and displays an error message. The block's parameter dialog box allows you to
You can also use the Advanced Pane of the Simulation Parameters dialog box to enable or disable all Assertion blocks in a model.
The Assertion block and its companion blocks in the Model Verification library are intended to facilitate creation of self-validating models. For example, you can use model verification blocks to test that signals do not exceed specified limits during simulation. When you are satisfied that a model is correct, you can turn error-checking off by disabling the verification blocks. You do not have to physically remove them from the model. If you need to modify a model, you can temporarily turn the verification blocks back on to ensure that your changes do not break the model.
Data Type Support
The Assertion block accepts input signals of any dimensions and any data type supported by Simulink, as well as fixed-point data types.
For a discussion on the data types supported by Simulink, refer to Data Types Supported by Simulink in the Using Simulink documentation.
Parameters and Dialog Box
Characteristics
| Direct Feedthrough |
No |
| Sample Time |
Inherited from driving block |
| Scalar Expansion |
No |
| Dimensionalized |
Yes |
| Zero Crossing |
No |
| Algebraic Constraint | Assignment | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |