Documentation for jbiu/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

math/

matrix2quaternion.pro


top source matrix2quaternion

Math

result = matrix2quaternion(rotmatrix)

Transforms a rotation matrix into a quaternion.

Return value

The function returns the quaternion corresponding to the rotation specified by the rotation matrix.

Parameters

rotmatrix in

A 3x3 rotation matrix.

Examples

IDL> theta=!PI/3. IDL> rm = [[COS(theta),0,-SIN(theta)],[0,1,0],[SIN(theta),0,COS(theta)]] IDL> quat = MATRIX2QUATERNION(rm) IDL> PRINT, quat 0.00000 -0.50000 0.00000 0.866025

Author information

History:

Written by: Jeremy Bailin 27 Nov 2008 Released in JBIU

File attributes

Modification date: Wed Apr 15 16:08:03 2009
Lines: 66