A=round(10*rand(2,3))-5 A = 4 -3 4 2 -1 4 B=round(10*rand(2,3))-5 B = -1 -4 3 4 -1 -5 C=A.*B C = -4 12 12 8 1 -20 % Kroneckeruv soucin: B=round(10*rand(2,2))-5 B = -4 -3 -3 1 A A = 4 -3 4 2 -1 4 C=kron(A,B) C = -16 -12 12 9 -16 -12 -12 4 9 -3 -12 4 -8 -6 4 3 -16 -12 -6 2 3 -1 -12 4 a=2:4 a = 2 3 4 B=eye(3) B = 1 0 0 0 1 0 0 0 1 kron(a,B) ans = 2 0 0 3 0 0 4 0 0 0 2 0 0 3 0 0 4 0 0 0 2 0 0 3 0 0 4 kron(2:4,eye(3)) ans = 2 0 0 3 0 0 4 0 0 0 2 0 0 3 0 0 4 0 0 0 2 0 0 3 0 0 4 x=(1:3) x = 1 2 3 x=(1:3)' x = 1 2 3 y=4:6 y = 4 5 6 y=(4:6)' y = 4 5 6 x.'*y ans = 32 dot(y,x) ans = 32 x=x+i x = 1.0000 + 1.0000i 2.0000 + 1.0000i 3.0000 + 1.0000i y=y-i y = 4.0000 - 1.0000i 5.0000 - 1.0000i 6.0000 - 1.0000i x'*y ans = 29.0000 -21.0000i dot(y,x) ans = 29.0000 +21.0000i y'*x ans = 29.0000 +21.0000i dot(y,x) ans = 29.0000 +21.0000i acos(dot(y,x)/(norm(x)*norm(y))) ans = 0.8849 - 0.6818i acos(abs(dot(y,x))/(norm(x)*norm(y))) ans = 0.2418 ans*180/pi ans = 13.8561 x=(1:3) x = 1 2 3 y=(4:6)' y = 4 5 6 acos(dot(y,x)/(norm(x)*norm(y))) ans = 0.2257 ans*180/pi ans = 12.9332 A A = 4 -3 4 2 -1 4 diag([-2,3])*A ans = -8 6 -8 6 -3 12 A*diag([-2,3,4]) ans = -8 -9 16 -4 -3 16 A=round(10*rand(2,3))-5 A = -2 -5 -1 -3 2 4 A=round(10*rand(4,3))-5 A = 0 -3 2 -1 2 -1 3 3 3 0 -5 0 diary off