Function
Purpose
Apply arbitrary arithmetic expression to scalar or vectorized input signal
Library
Control / Functions & Tables
Description
The Function block applies an arithmetic expression specified in C language syntax to its input. The input may be a scalar or vectorized continuous signal, the output is always a scalar continuous signal. The expression may consist of one or more of the following components:
u— the input of the block. If the input is vectorized,u(i)oru[i]represents elementiof the vector. To access the first element, enteru(1),u[1], orualone.Brackets
Numeric constants, including
piArithmetic operators (
+ - * / ^)Relational operators (
== != > < >= <=)Logical operators (
&& || !)Mathematical functions —
abs,acos,asin,atan,atan2,cos,cosh,exp,log,log10,max,min,mod,pow,sgn,sin,sinh,sqrt,tan, andtanh.Workspace variables
Parameters
- Expression
The expression applied to the input signal, in C language syntax.
Probe Signals
- Input
The input signal.
- Output
The output signal.