| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Math Operations

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.
The Unary Minus block accepts signals of any numeric data type that Simulink supports, including fixed-point data types, but not unsigned integer types.

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.
If selected, fixed-point overflows saturate. Otherwise, they wrap.
Direct Feedthrough | No |
Sample Time | Specified in the Sample time parameter |
Scalar Expansion | Yes, of input or initial conditions |
Multidimensionalized | Yes |
![]() | Trigonometric Function | Uniform Random Number | ![]() |

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 |