MATLAB Function Reference |
Syntax
theta = subspace(A,B)
Description
theta = subspace(A,B)
利用A
和B
的行給定兩個子平面(subspaces),去找尋這兩個子平面之間所夾的角度為何。如果A
和B
為單位長度的行向量,則本函數的功用和acos(A'
*B)
是一樣的。
Remarks
如果兩個子平面之間所夾的角度非常的小,則兩個平面就相當接近(nearly)線性相依(linearly dependent)。In a physical experiment described by some observations A
, and a second realization of the experiment described by B
, subspace(A,B)
gives a measure of the amount of new information afforded by the second experiment not associated with statistical errors of fluctuations.
Examples
考慮兩個哈達瑪(Hadamard)矩陣,在矩陣中的行是互相垂直的。
H = hadamard(8); A = H(:,2:4); B = H(:,5:8);
請注意:矩陣A
和B
是大小不同的--矩陣A
是三行,而矩陣B
是四行。為了要找出兩個平面之間所夾的角度,並不一定要給定兩個大小相同的子平面。以幾何學的觀點來說, this is the angle between two hyperplanes embedded in a higher dimensional space.
theta = subspace(A,B) theta = 1.5708
theta - pi/2 ans = 0
subsindex | subsref |