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_ident

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


Abstract


   CSPICE_IDENT creates the 3x3 double precision identity matrix.

I/O


   The call:

      cspice_ident, matrix

   returns:

      matrix   the 3x3 Identity matrix.

               help, matrix
                  DOUBLE = Array[3,3]

               That `matrix' is the following

                  .-                       -.
                  |  1.0d0   0.0d0   0.0d0  |
                  |  0.0d0   1.0d0   0.0d0  |
                  |  0.0d0   0.0d0   1.0d0  |
                  `-                       -'

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) Define a 3x3 matrix and compute its inverse using the Icy
      routine cspice_invert. Verify the accuracy of the computed inverse
      using the mathematical identity

              -1
         m x m   - i = 0

      where `i' is the 3x3 identity matrix.


      Example code begins here.


      PRO ident_ex1

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

         print, 'Original Matrix:'
         print, format='(3F16.7)', m

         ;;
         ;; Invert the matrix, then output.
         ;;
         cspice_invert, m, mout

         print, ' '
         print, 'Inverse Matrix:'
         print, format='(3F16.7)', mout

         ;;
         ;; Check the `m' times `mout' produces the identity matrix.
         ;;
         cspice_ident, idmat
         cspice_mxm, m, mout, imat

         mzero = imat - idmat

         print, ' '
         print, 'Original times inverse minus identity:'
         print, format='(3F16.7)', mzero

      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.5000000       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 minus identity:
             0.0000000       0.0000000       0.0000000
             0.0000000       0.0000000       0.0000000
             0.0000000       0.0000000       0.0000000


Particulars


   This is a utility routine for obtaining the 3x3 identity matrix.

   IDL native code to accomplish the same operation:

      ident = identity(3)

   The IDL 'identity(N)' routine creates arbitrary NxN identity
   matrices.

Exceptions


   1)  If the output argument `matrix' 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.2, 10-AUG-2021 (JDR)

       Edited the header to comply with NAIF standard. Added complete
       code example.

       Added the -Parameters and -Particulars sections.

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

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

   -Icy Version 1.0.1, 09-DEC-2005 (EDW)

       Added -Examples section.

   -Icy Version 1.0.0, 16-JUN-2003 (EDW)

Index_Entries


   Get the 3x3 identity matrix



Fri Dec 31 18:43:05 2021