<< shortcutand elementary functions size >>

shortcutor


Short circuit 'OR' operator, ||


Syntax


C = shortcutor(A, B)
C = A || B

Input argument


A

a variable

B

a variable

Output argument


C

result of A || B

Description


C = shortcutor(A, B) performs a logical OR operation, the second operand is evaluated only when the result is not fully determined by the first operand.

Example


A = [6 8 0; 0 3 89; 15 0 0]
B = [66 56 0; 11 33 55; -11 0 0]
C = A || B
D = shortcutor(B, A)
C == D

See also


or, xor.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< shortcutand elementary functions size >>