Simulink Reference | ![]() ![]() |
Perform a mathematical function
Library
Description
The Math Function block performs numerous common mathematical functions.
You can select one of these functions from the Function list: exp
, log
, 10
u, 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
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 | ![]() |