Fixed-Point Blockset    
Unary Minus

Negate the input

Library

Math

Description

The Unary Minus block is a masked S-function that negates the input. The block accepts only signed data types.

For signed data types, you cannot accurately negate the most negative value since the result is not representable by the data type. In this case, the behavior of the block is controlled by the Saturate to max or min when overflows occur check box. If selected, the most negative value of the data type wraps to the most positive value. If not selected, the operation has no effect. If an overflow occurs, then a warning is returned to 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 the Saturate to max or min when overflows occur check box is selected, then the negation of -128 is 127. If it is not selected, then the negation of -128 remains at -128.

Parameters and Dialog Box

Saturate to max or min when overflows occur
If selected, fixed-point overflows saturate.

Characteristics

Input Port
Any data type supported by the blockset
Output Port
Same as the input (a nonzero bias is negated offline)
Direct Feedthrough
No
Scalar Expansion
Yes--of input or initial conditions


  Tapped Delay Unit Delay