This section describes the subset of EML that constitutes REML. REML supports the following aspects of EML. Note that in some cases not all aspects of a feature are supported. For example, a function might not support all numbers and types of input arguments.
Syntax
While REML generally supports the rich EML notation for defining matrices, REML does impose some syntax restrictions. The most prominent restriction is that if any element of a row is a non-trivial expression, then the row must be delimited with commas instead of spaces. For example, if a = 5 and b = 4 then [ a + b -4 -3 ] is a valid EML matrix which evaluates to [ 9 -4 -3 ]. The REML syntax does not allow this expression. Instead it requires it to be written [ a + b, -4, -3 ].
Types
- double, single, uint8, int8, uint16, int16, uint32, int32, logical, string 1 , enumerations 2 , structures 3
Control flow
- if statements
- while loops
- for loops
- switch statement
- break statement
- continue statement
- return statement
User-defined functions and subfunctions
- local and persistent variables
Array indexing
- scalar indexing, e.g. x(4)
- vector indexing, e.g. x(2:5) or x(2:end) or x(:,3)
Logical operators
- &, |, &&, ||, ~
- and, or, xor, not, any, all
Relational operators
Math operators
Math functions
- sin, cos, tan
- asin, acos, atan, atan2
- exp, log, log10
- sinh, cosh, tanh
- sqrt
- fix, floor, ceil, round
- mod, rem
- sign, abs
Statistical functions
These functions support vector and matrix inputs, but not higher dimensional arrays.
Matrix operations
- transpose ( ' )
- addition, subtraction
- multiplication, division
- inv
- zeros
- ones
- eye
- diag
Element-wise array operations
Vector operations
- sum, prod, dot, size, min, max, length
Bit operation
- bitset, bitget, bitand, bitor, bitxor, bitcmp, bitshift
Cast operations
- double, single, uint8, int8, uint16, int16, uint32, int32, logical
String operations
Miscellaneous functions
- class
- true, false
- intmin, intmax
- isempty, isfinite, isinf, isnan
1. Support for strings is currently very limited.
2. defined by Simulink.IntEnumType classes
3. Simulink.Bus inputs or outputs