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

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

Added original make3d

File size: 683 bytes
Line 
1% Test code for the quaternion sinh and cosh functions.
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
8% Test 1. Real quaternion data.
9
10q = quaternion(randn(100,100), randn(100,100), randn(100,100), randn(100,100));
11
12compare(sinh(q).^2 - cosh(q).^2, -ones(100,100), T,...
13    'quaternion/sinh/cosh failed test 1.');
14
15clear q
16
17% Test 2. Complex quaternion data.
18
19b = quaternion(complex(randn(100,100)),complex(randn(100,100)),...
20               complex(randn(100,100)),complex(randn(100,100)));
21
22compare(sinh(b).^2 - cosh(b).^2, -ones(100,100), T,...
23    'quaternion/sinh/cosh failed test 2.');
24
25clear b T
Note: See TracBrowser for help on using the repository browser.