Using Simulink | ![]() ![]() |
Apply a MATLAB function or expression to the input.
Library
Description
The MATLAB Fcn block applies the specified MATLAB function or expression to the input. The output of the function must match the output dimensions of the block or an error occurs.
Here are some sample valid expressions for this block.
sin atan2(u(1), u(2)) u(1)^u(2)
Data Type Support
A MATLAB Fcn block accepts one complex- or real-valued input of type double
and generates real or complex output of type double
, depending on the setting of the Output signal type parameter.
Parameters and Dialog Box
-1
. Otherwise, you must specify the correct dimensions or an error will result.real
, complex
, or auto
. A value of auto
sets the block's output type to be the same as the type of the input signal.Characteristics
Direct Feedthrough |
Yes |
Sample Time |
Inherited from driving block |
Scalar Expansion |
N/A |
Dimensionalized |
Yes |
Zero Crossing |
No |
![]() | Math Function | Matrix Concatenation | ![]() |