Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
cspice_invort

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_INVORT constructs the inverse of a 3x3 matrix with orthogonal
   columns and non-zero column norms using a numerically stable algorithm.
   The rows of the output matrix are the columns of the input matrix divided
   by the length squared of the corresponding columns.

I/O


   Given:

      m        a 3x3 double precision matrix.

               help, m
                  DOUBLE = Array[3,3]

   the call:

     cspice_invort, m, mit

   returns:

      mit      double precision 3x3 matrix describing the matrix obtained by
               transposing 'm' and dividing the rows by squares of their norms.

               help, mit
                  DOUBLE = Array[3,3]

Parameters


   None.

Examples


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

   1) Given a double precision 3x3 matrix with mutually orthogonal
      rows of arbitrary length, compute its inverse. Check that the
      original matrix times the computed inverse produces the
      identity matrix.

      Example code begins here.


      PRO invort_ex1

         ;;
         ;; Define a matrix to invert.
         ;;
         m = [ [ 0, -1.d, 0], [ 0.5d, 0, 0], [ 0, 0, 1.d] ]

         print, 'Original matrix: '
         print, m
         print, ''

         ;;
         ;; Invert the matrix, then output.
         ;;
         cspice_invort, m, mout
         print,'Inverse matrix: '
         print, mout
         print, ''

         ;;
         ;; Check the `m' times `mout' produces the identity matrix.
         ;;
         print, 'Original times inverse: '
         print, m ## mout

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


      Original matrix:
             0.0000000      -1.0000000       0.0000000
            0.50000000       0.0000000       0.0000000
             0.0000000       0.0000000       1.0000000

      Inverse matrix:
             0.0000000       2.0000000       0.0000000
            -1.0000000       0.0000000       0.0000000
             0.0000000       0.0000000       1.0000000

      Original times inverse:
             1.0000000       0.0000000       0.0000000
             0.0000000       1.0000000       0.0000000
             0.0000000       0.0000000       1.0000000


Particulars


   Suppose that `m' is the matrix

          .-                      -.
          |   A*u    B*v     C*w   |
          |      1      1       1  |
          |                        |
          |   A*u    B*v     C*w   |
          |      2      2       2  |
          |                        |
          |   A*u    B*v     C*w   |
          |      3      3       3  |
          `-                      -'

   where the vectors (u , u , u ),  (v , v , v ),  and (w , w , w )
                       1   2   3      1   2   3          1   2   3

   are unit vectors. This routine produces the matrix:


          .-                      -.
          |   a*u    a*u     a*u   |
          |      1      2       3  |
          |                        |
          |   b*v    b*v     b*v   |
          |      1      2       3  |
          |                        |
          |   c*w    c*w     c*w   |
          |      1      2       3  |
          `-                      -'

   where a = 1/A, b = 1/B, and c = 1/C.

Exceptions


   1)  If any of the columns of `m' have zero length, the error
       SPICE(ZEROLENGTHCOLUMN) is signaled by a routine in the call
       tree of this routine.

   2)  If any column is too short to allow computation of the
       reciprocal of its length without causing a floating point
       overflow, the error SPICE(COLUMNTOOSMALL) is signaled by a
       routine in the call tree of this routine.

   3)  If the input argument `m' is undefined, an error is signaled
       by the IDL error handling system.

   4)  If the input argument `m' is not of the expected type, or it
       does not have the expected dimensions and size, an error is
       signaled by the Icy interface.

   5)  If the output argument `mit' is not a named variable, an error
       is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.1, 01-NOV-2021 (JDR)

       Edited the header to comply with NAIF standard. Added
       complete code example. Extended -Abstract section.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections, and
       completed -Particulars section.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.0, 14-NOV-2013 (EDW)

Index_Entries


   Transpose a matrix and invert the lengths of the rows
   Invert a pseudo orthogonal matrix



Fri Dec 31 18:43:05 2021