The valid values that you can use in an expression are as follows

  • Real Number
  • Complex Number 
  • Boolean 
  • Matrix 

Real Number

x = 3.14159

y = 2 

Complex Number

c = 3 + 4i
d = 1.25 + 0.25i 

Note

An 'i' character in an expression can be parsed as either an imaginary unit or a character of a variable name. If the character 'i' is placed after a number, and the next character is neither an alphabet nor number, it will be parsed as an imaginary unit. Otherwise, it will be parsed as a variable. The examples are as follows
 ca = 1i 'i' is parsed as an imaginary unit.
 cb = i 'i' is parsed as a variable.
 cx = 3.25i 'i' is parsed as an imaginary unit.
 cy = 4i4 'i' is parsed as the first character of a variable name 'i4' 

Boolean

a = true
b = false 

Matrix

U = [1.0, 2.0, 3.0; 4.0, 5.0, 6.0; 7.0, 8.0, 9.0]

A = [true; false; false; true]

You can add a matrix to the built-in Math Solver by using the following syntax (a semicolon is used as a row separator and comma or space is used as a comma separator). The examples are as follows

U = [1.0, 2.0, 3.0; 4.0, 5.0, 6.0; 7.0, 8.0, 9.0] 


A = [true; false; false; true] 

You can refer to a matrix element with the row and column index specified in round brackets after a matrix name. The examples are as follows (see U above)

U(1, 1) is 1.0
U(2, 3) is 6.0 

You can also refer to a matrix element with only one index specified in round brackets after a matrix name. In this case, the matrix will be considered as a column-major order matrix. The elements on the given column-major order index will be returned. The examples are as follows (see U above)

U(2) is 4.0
U(6) is 8.0