Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Type::Boolean

Type representing boolean expressions

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

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?