Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

Unary Minus - Negate input

Library

Math Operations

Description

The Unary Minus block negates the input. The block accepts only signed data types.

For signed data types, you cannot accurately negate the most negative value because the data type cannot represent the result. In this case, the Saturate on integer overflow check box controls the behavior of the block. If you select the check box, the most negative value of the data type wraps to the most positive value. If you do not select the check box, the operation has no effect. If an overflow occurs, a warning appears at the MATLAB command line.

For example, suppose the block input is an 8-bit signed integer. The range of this data type is from -128 to 127, and the negation of -128 is not representable. If you select the Saturate on integer overflow check box, the negation of -128 is 127. If you do not select the check box, the negation of -128 remains at -128.

Data Type Support

The Unary Minus block accepts signals of any numeric data type that Simulink supports, including fixed-point data types, but not unsigned integer types.

Parameters and Dialog Box

Sample time (-1 for inherited)

Specify the time interval between samples. To inherit the sample time, set this parameter to -1. See How to Specify the Sample Time in the Simulink User's Guide for more information.

Saturate on integer overflow

If selected, fixed-point overflows saturate. Otherwise, they wrap.

Characteristics

Direct Feedthrough

No

Sample Time

Specified in the Sample time parameter

Scalar Expansion

Yes, of input or initial conditions

Multidimensionalized

Yes

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS