Main Content

Math Operations

R2026b
Blocks for arithmetic, trigonometric, and algebraic operations on signals, such as Gain, Sum, Trigonometric Function, and Math Function

Use blocks from the Math Operations library to perform arithmetic, trigonometric, and algebraic computations on signals. You can add, multiply, divide, take absolute values, compute trigonometric functions, or evaluate polynomial and matrix expressions.

To add blocks from this library to your model, see Add Blocks to Models.

Blocks

Abs blockAbsOutput absolute value of input
Algebraic Constraint blockAlgebraic ConstraintConstrain signal value when solving algebraic loop
Assignment blockAssignmentAssign values to specified elements of signal
Bias blockBiasAdd bias to input
Complex to Magnitude-Angle blockComplex to Magnitude-AngleCompute magnitude and/or phase angle of complex signal
Complex to Real-Imag blockComplex to Real-ImagOutput real and imaginary parts of complex input signal
Divide blockDivideDivide one input by another
Dot Product blockDot ProductGenerate dot product of two vectors
Find Nonzero Elements blockFind Nonzero ElementsFind nonzero elements in array
Gain blockGainMultiply input by constant
Magnitude-Angle to Complex blockMagnitude-Angle to ComplexConvert magnitude and/or a phase angle signal to complex signal
Math Function blockMath FunctionPerform mathematical function
Matrix Concatenate blockMatrix ConcatenateConcatenate input matrices of same data type for iterative processing
MinMax blockMinMaxOutput minimum or maximum input value
MinMax Running Resettable blockMinMax Running ResettableDetermine minimum or maximum of signal over time
Permute Dimensions blockPermute DimensionsRearrange dimensions of multidimensional array dimensions
Polynomial blockPolynomialPerform evaluation of polynomial coefficients on input values
Product of Elements blockProduct of ElementsCopy or invert one scalar input, or collapse one nonscalar input
Product blockProduct, Matrix MultiplyMultiply and divide scalars and nonscalars or multiply and invert matrices
Real-Imag to Complex blockReal-Imag to ComplexConvert real and/or imaginary inputs to complex signal
Reshape blockReshapeChange dimensionality of signal
Rounding Function blockRounding FunctionApply rounding function to signal
Sign blockSignIndicate sign of input
Sine Wave Function blockSine Wave FunctionGenerate sine wave, using external signal as time source
Slider Gain blockSlider GainVary scalar gain using slider
Sqrt blockSqrtCalculate square root, signed square root, or reciprocal of square root
Squeeze blockSqueezeRemove singleton dimensions from multidimensional signal
Sum blockSumAdd or subtract inputs
Trigonometric Function blockTrigonometric FunctionSpecified trigonometric function on input
Unary Minus blockUnary MinusNegate input
Vector Concatenate blockVector ConcatenateConcatenate input vectors of same data type for iterative processing
Weighted Sample Time Math blockWeighted Sample Time MathSupport calculations involving sample time

Tools

Library BrowserFind and add blocks to model

Topics

Featured Examples