Graphics Reference
In-Depth Information
exercise A-12
Given arrays:
é
110
011
001
ù
é
i
1 2
013
00
-+
-
i
i
i
ù
é
1
1
1
ù
ê
ê
ú
ú
ê
ê
ú
ú
ê
ê
ú
ú
A
=
B
=
-
-
C
=
0
sq
rt
()
2
i
-
sqrt
()
2
i
i
1
-
1
-
1
ë
û
ë
û
ë
û
calculate AB - B , A 2 + B 2 + C 2 , ABC , sqrt ( A ) + sqrt ( B ) + sqrt( C ), ( e A + e B + e C ), their transposes and their inverses.
Also check that any matrix is multiplied by its inverse obtains the identity matrix.
>> A=[1 1 0;0 1 1;0 0 1]; B=[i 1-i 2+i;0 -1 7-i;0 0 -i]; C=[1 1 1; 0 sqrt(2)*i
-sqrt(2)*i;1 -1 -1];
>> M1=A*B-B*A
M1 =
0 -1.0000 - 1.0000i 2.0000
0 0 1.0000 - 1.0000i
0 0 0
>> M2=A^2+B^2+C^2
M2 =
2.0000 2.0000 + 3.4142i 3.0000 - 5.4142i
0 - 1.4142i -0.0000 + 1.4142i 0.0000 - 0.5858i
0 2.0000 - 1.4142i 2.0000 + 1.4142i
>> M3=A*B*C
M3 =
5.0000 + 1.0000i -3.5858 + 1.0000i -6.4142 + 1.0000i
3.0000 - 2.0000i -3.0000 + 0.5858i -3.0000 + 3.4142i
0 - 1.0000i 0 + 1.0000i 0 + 1.0000i
>> M4=sqrtm(A)+sqrtm(B)-sqrtm(C)
M4 =
0.6356 + 0.8361i -0.3250 - 0.8204i 3.0734 + 1.2896i
0.1582 - 0.1521i 0.0896 + 0.5702i 3.3029 - 1.8025i
-0.3740 - 0.2654i 0.7472 + 0.3370i 1.2255 + 0.1048i
Search WWH ::




Custom Search