and
Performs logical conjunction, the 'and' operation, equivalent to the & operator.
Syntax
and
and(x, y)
and(x, y, ...)
Inputs
- x
- Anything that can be logically tested.
- y
- Anything that can be logically tested.
Outputs
- R
- Numerical representation of true or false (1 or 0).
Examples
and(true,true,true,true,true)
R = 1
and([true, true; false, false],[false, true; true,true])
ans = [Matrix] 2 x 2
0 1
0 0
Comments
The function returns true if both arguments are logically true, and false otherwise.
otherwise.