boolean(1)

NAME
"Scilab object: boolean" - boolean variables and operators & | ~

DESCRIPTION
A boolean variable is %T (for "true") or %F (for "false"). These variables can be used to define matrices of booleans, with the usual syntax. Boolean matrices are manipulated as ordinary matrices with usual operations and usual meaning (+, *, -, etc)

~b  : is the negation of boolean b (matrix).

b1&b2
    : is the logical and of b1 and b2 (matrices).

b1|b2
    : is the logical or of b1 and b2 (matrices).

Boolean variables can be used for indexing matrices or vectors.
    For instance a([%T,%F,%T],:) returns the submatrix made of rows 1 and 3 of a.

EXAMPLE
[1,2]==[1,3]
[1,2]==1
a=1:5; a(a>2)

SEE ALSO
matrices, | , & , ~, or, and.