source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/qtfm/test/test_eig.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 476 bytes
Line 
1% Test code for the quaternion eigenvalue decomposition.
2
3% Copyright © 2006 Stephen J. Sangwine and Nicolas Le Bihan.
4% See the file : Copyright.m for further details.
5
6T = 1e-12;
7
8A = quaternion(randn(10,10),randn(10,10),randn(10,10),randn(10,10));
9A = A * A'; % The matrix must be Hermitian.
10
11[V, D] = eig(A);
12compare(A * V , V * D, T, 'quaternion/eig failed test 1A')
13
14D = eig(A);
15compare(A * V, ...
16        V * diag(D), T,   'quaternion/eig failed test 1B')
17
18clear A V D
Note: See TracBrowser for help on using the repository browser.