source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/qtfm/@quaternion/private/dft_axis.m @ 37

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

Added original make3d

File size: 1.6 KB
Line 
1function A = dft_axis(RC);
2% Private function to supply a default quaternion Fourier transform axis,
3% real or complex depending on the (logical) parameter value. 1 indicates
4% real, 0 complex.
5
6% Copyright © 2005 Stephen J. Sangwine and Nicolas Le Bihan.
7% See the file : Copyright.m for further details.
8
9error(nargchk(1, 1, nargin)), error(nargoutchk(1, 1, nargout))
10
11if ~islogical(RC)
12    error('Argument must be a logical value');
13end
14
15% The value returned must be a root of -1. Real quaternion roots of -1 were
16% studied by Hamilton and any unit pure real quaternion is a root of -1.
17% The value chosen here is unbiased in any particular direction, since it
18% has equal x, y, z components. Complex quaternion roots of -1 are not so
19% simple. See the following for the theory behind the choice made here:
20%
21% S. J. Sangwine, Biquaternion (Complexified Quaternion) Roots of -1,
22% Advances in Applied Clifford Algebras, 16(1), February 2006, 63-68.
23% DOI:10.1007/s00006-006-0005-8.
24%
25% S. J. Sangwine, Biquaternion (complexified quaternion) roots of -1,
26% June 2005. arXiv:math.RA/0506190, available at: http://arxiv.org/.
27
28if RC
29
30    % Real axis. We use the unit function because otherwise the result
31    % would not have unit modulus.
32
33    A = unit(quaternion(1,1,1));
34
35else
36
37    % Complex axis. This value has unit modulus as it stands and the real
38    % and imaginary parts are perpendicular, both requirements for a root
39    % of -1. Also, the modulus of the real part squared less the modulus
40    % of the imaginary part squared, equals 1.
41
42    A = complex(quaternion(1,1,1), quaternion(0,1,-1));
43
44end
Note: See TracBrowser for help on using the repository browser.