numbers |
'integer' — integer numbers
'rational' — rational numbers
'vpareal' — variable-precision floating-point
real numbers
'complex' — complex numbers
'real' — real numbers, including
'integer' , 'rational' , and
'vpareal'
'number' — numbers, including
'integer' , 'rational' ,
'vpareal' , 'complex' , and
'real'
|
hasSymType(sym(2),'integer')
hasSymType(sym(1/2),'rational')
hasSymType(vpa(0.5),'vpareal')
hasSymType(vpa(1i),'complex')
hasSymType([sym(1/2) vpa(0.5)],'real')
hasSymType([vpa(1i) sym(1/2)],'number')
|
constants | 'constant' — symbolic mathematical constants,
including 'number' | hasSymType([sym(pi) vpa(1i)],'constant') |
symbolic math functions | 'vpa' , 'sin' ,
'exp' , and so on — symbolic math functions in symbolic
expressions | hasSymType(vpa(sym(pi)),'vpa') |
unassigned symbolic functions |
'F' , 'g' , and so on — function
name of an unassigned symbolic function
'symfun' — unassigned symbolic functions
|
syms F(x); hasSymType(F(x+2),'F')
syms g(x); hasSymType(g(x),'symfun')
|
arithmetic operators |
'plus' — addition operator +
and subtraction operator -
'times' — multiplication operator
* and division operator /
'power' — power or exponentiation operator
^ and square root operator
sqrt
|
syms x y; hasSymType(2*x + y,'plus')
syms x y; hasSymType(x*y,'times')
syms x y; hasSymType(x^(y+2),'power')
|
variables | 'variable' — symbolic variables | hasSymType(sym('x'),'variable') |
units | 'units' — symbolic units | hasSymType(symunit('m'),'units') |
expressions | 'expression' — symbolic expressions, including all of
the preceding symbolic types | hasSymType(sym('x')+1,'expression') |
logical expressions |
'or' — logical OR operator
|
'and' — logical AND operator
&
'not' — logical NOT operator
~
'xor' — logical exclusive-OR operator
xor
'logicalconstant' — symbolic logical constants
symtrue and symfalse
'logicalexpression' — logical expressions,
including 'or' , 'and' ,
'not' , 'xor' ,
symtrue and symfalse
|
syms x y; hasSymType(x|y,'or')
syms x y; hasSymType(x&y,'and')
syms x; hasSymType(~x,'not')
syms x y; hasSymType(xor(x,y),'xor')
hasSymType(symtrue,'logicalconstant')
syms x y;
hasSymType(~x|y,'logicalexpression')
|
equations and inequalities |
'eq' — equality operator
==
'ne' — inequality operator
~=
'lt' — less-than operator <
or greater-than operator >
'le' — less-than-or-equal-to operator
<= or greater-than-or-equal-to operator
>=
'equation' — symbolic equations and inequalities,
including 'eq' , 'ne' ,
'lt' , and 'le'
|
syms x; hasSymType(x==2,'eq')
syms x; hasSymType(x~=1,'ne')
syms x; hasSymType(x>0,'lt')
syms x; hasSymType(x<=2,'le')
syms x; hasSymType([x>0 x~=1],'equation')
|
unsupported symbolic types | 'unsupported' — unsupported symbolic
types
| |