home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / octa21fb.zip / octave / SCRIPTS.ZIP / scripts.fat / quatern / qconj.m < prev    next >
Text File  |  1999-12-24  |  244b  |  12 lines

  1.  
  2. function retval = qconj(q)
  3.   # function retval = qconj(q)
  4.   # conjugate of a quatern
  5.   #  q = [w,x,y,z] = w*i + x*j + y*k + z
  6.   # qconj(q) = -w*i -x*j -y*k + z
  7.  
  8.   [a,b,c,d] = quatern(q);
  9.   retval = quatern(-a,-b,-c,d);
  10. endfunction
  11.  
  12.