6/7/2019 Math Function (Simulink Reference)
Simulink Reference
Math Function
Perform a mathematical function
Library
Math Operations
Description
The Math Function block performs numerous common mathematical functions.
You can select one of these functions from the Function list: exp, log, 10u, log10, magnitude2, square, sqrt, pow,
conj, reciprocal, hypot, rem, mod, transpose, and hermitian. The block output is the result of the operation of the
function on the input or inputs.
The name of the function appears on the block icon. Simulink automatically draws the appropriate number of
input ports.
Use the Math Function block instead of the Fcn block when you want vector or matrix output, because the Fcn
block can produce only scalar output.
Data Type Support
A Math Function block accepts complex or real-valued signals or signal vectors of type double. The output
signal type is real or complex, depending on the setting of the Output signal type parameter.
Parameters and Dialog Box
Function
The mathematical function.
Output signal type
The dialog allows you to select the output signal type of the Math Function block as real, complex, or
auto.
Input Output Signal Type
https://edoras.sdsu.edu/doc/matlab/toolbox/simulink/slref/mathfunction.html 1/2
6/7/2019 Math Function (Simulink Reference)
Function Signal Auto Real Complex
Exp, log, 10u, log10, square, sqrt, pow, reciprocal, conjugate, real real real complex
transpose, hermitian complex complex error complex
magnitude squared real real real complex
complex real real complex
hypot, rem, mod real real real complex
complex error error error
Characteristics
Direct Feedthrough Yes
Sample Time Inherited from driving block
Scalar Expansion Of the input when the function requires two inputs
Dimensionalized Yes
Zero Crossing No
Manual Switch MATLAB Fcn
https://edoras.sdsu.edu/doc/matlab/toolbox/simulink/slref/mathfunction.html 2/2