Mercurial > octave-nkf
comparison scripts/quaternion/qtrans.m @ 7125:f084ba47812b
[project @ 2007-11-08 02:29:23 by jwe]
author | jwe |
---|---|
date | Thu, 08 Nov 2007 02:29:24 +0000 |
parents | a1dbe9d80eee |
children |
comparison
equal
deleted
inserted
replaced
7124:d07cb867891b | 7125:f084ba47812b |
---|---|
26 ## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> | 26 ## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> |
27 ## Adapted-By: jwe | 27 ## Adapted-By: jwe |
28 | 28 |
29 function v = qtrans (v, q) | 29 function v = qtrans (v, q) |
30 | 30 |
31 if (nargin != 2) | |
32 print_usage (); | |
33 endif | |
34 | |
31 if (! isvector (v) || length (v) != 4) | 35 if (! isvector (v) || length (v) != 4) |
32 error ("qtrans: v(%d,%d) must be a quaternion", rows (v), columns (v)); | 36 error ("qtrans: v(%d,%d) must be a quaternion", rows (v), columns (v)); |
33 elseif (! isvector (q) || length (q) != 4) | 37 elseif (! isvector (q) || length (q) != 4) |
34 error ("qtrans: q(%d,%d) must be a quaternion", rows (q), columns (q)); | 38 error ("qtrans: q(%d,%d) must be a quaternion", rows (q), columns (q)); |
35 endif | 39 endif |