Graphics Reference
In-Depth Information
C =
24 26 34
15 18 21
78 86 118
D =
0.5219 + 0.8432i 0.5793 - 0.0664i 0.7756 - 0.2344i
0.3270 + 0.0207i 0.3630 + 1.0650i 0.4859 - 0.2012i
1.7848 - 0.5828i 1.9811 - 0.7508i 2.6524 + 0.3080i
E =
1. 0e + 003 *
0.8626 0.9568 1.2811
0.5401 0.5999 0.8027
2.9482 725 4.3816
A.11.2 Relational Operators
MATLAB also provides symbols to denote the relational operations. Relational operators perform comparisons
element by element between two matrices and return an array of the same size whose elements are zero if the
corresponding relationship is true, or one if the corresponding relation is false. The relational operators can also
compare scalar vectors or matrices, in which case it is compared with all the elements of the array. Below is a table
with these operators.
<
Less than (for complex, affects only real parts)
< =
Less than or equal (only applies to real parts)
>
Greater than (only applies to real parts)
> =
Greater than or equal (only applies to real parts)
x == y
Equality (affects complex numbers)
x ~ = y
Inequality (affects complex numbers)
A.11.3 Logical Operators
MATLAB provides symbols to denote logical operations. The logical operators offer a way to combine or deny
relational expressions. The following table shows this type of operator:
~ A
Logical negation (NOT) or A supplementary
A & B
Logical conjunction (AND) or intersection of A and B
A | B
Logical disjunction (OR) or union of A and B
XOR (A, B)
OR exclusive (XOR) or symmetric difference of A and B (worth 1 if A or B, but not both)
 
Search WWH ::




Custom Search