Profile

 1 ```(* ``` ```Mathematical functions in Simulink Math Function blocks ``` ```All these functions can be applied to scalar value. All but transpose and ``` ```hermitian can be also applied as element-wise operations on vector, matrices ``` ```inputs. transpose and hermitian are applied on vector and matrices as regular ``` ```(non element-wise) operations. ``` ```The Lustre library provides only scalar functions for all cases, and, in the future, ``` ```the matrix versions of them. ``` ```exp: ``` ```log ``` ```10^u ``` ```log10 ``` ```magnitude^2 ``` ```square ``` ```pow ``` ```conj ``` ```reciprocal ``` ```hypot ``` ```rem ``` ```mod ``` ```transpose ``` ```hermitian ``` ```For the moment, we focus only on theoretical types: real, complex. ``` ```A future version can be specialized for concrete datatypes (single, double, ``` ```(u)intXX). ``` ```*) ``` ```-- open [itex] ``` ```function exp_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```function log_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```function _10u_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```function log10_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```-- complex modulus: |x|^2 ``` ```function magnitude_2_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```function square_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```function pow_scalar_real (x,y: real) returns (z: real) prototype C lib m; ``` ```function conj_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```function reciprocal_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```function hypot_scalar_real (x,y: real) returns (z: real) prototype C lib m; ``` ```function rem_scalar_real_int_int_int (x,y: int) returns (z: int) prototype C lib m; ``` ```function rem_scalar_real_double_double_double (x,y: real) returns (z: real) prototype C lib m; ``` ```function rem_scalar_real_double_int_double (x: real; y: int) returns (z: real) prototype C lib m; ``` ```function rem_scalar_real_int_double_double (x: int; y: real) returns (z: real) prototype C lib m; ``` ```function mod_scalar_real_int_int_int (x,y: int) returns (z: int) prototype C lib m; ``` ```function mod_scalar_real_double_double_double (x,y: real) returns (z: real) prototype C lib m; ``` ```function mod_scalar_real_double_int_double (x: real; y: int) returns (z: real) prototype C lib m; ``` ```function mod_scalar_real_int_double_double (x: int; y: real) returns (z: real) prototype C lib m; ``` ```(* ``` ```-- function transpose_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```-- function hermitian_scalar_real (x: real) returns (y: real) prototype C lib m; ``` ```-- function exp_matrix_real (const i,j: int; x: real^i^j) returns (y: real^i^j) prototype C lib m; ``` ```*) ```