Type::Boolean

Type representing boolean expressions

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

testtype(obj, Type::Boolean)

Description

Type::Boolean represents logical formulas.

Boolean expressions are all of the following objects: the Boolean constants TRUE, FALSE, and UNKNOWN; identifiers; equations and inqualities; expressions with operator and, or, not, xor, _implies, _equiv if each operand is a Boolean expression; or results returned by solvelib::isEmpty.

Examples

Example 1

Identifiers and boolean constants are Boolean expressions:

testtype(TRUE, Type::Boolean), testtype(a, Type::Boolean)

Example 2

In order that an expression be Boolean, it is not sufficient that only its operator is a logical operator; also its operands must be Boolean expressions.

testtype(a >= 3 and b, Type::Boolean); 
testtype(a+b and c, Type::Boolean)

Parameters

obj

Any MuPAD® object

Return Values

See testtype

See Also

MuPAD Functions

Was this topic helpful?