Mercurial > hg > octave-lyh
diff scripts/quaternion/qconj.m @ 3224:1e7532b9173b
[project @ 1998-12-04 22:08:23 by jwe]
author | jwe |
---|---|
date | Fri, 04 Dec 1998 22:08:23 +0000 |
parents | |
children | a892190f4977 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/scripts/quaternion/qconj.m @@ -0,0 +1,11 @@ + +function retval = qconj(q) + # function retval = qconj(q) + # conjugate of a quaternion + # q = [w,x,y,z] = w*i + x*j + y*k + z + # qconj(q) = -w*i -x*j -y*k + z + + [a,b,c,d] = quaternion(q); + retval = quaternion(-a,-b,-c,d); +endfunction +