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

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_VPROJ calculates the projection of a set of 3-vectors onto
   another set of 3-vectors.

I/O


   Given:

      a   the vector(s) to project onto the vector(s) 'b'.

          [3,n] = size(a); double = class(a)

      b   the vector(s) to receive the projection(s).

          [3,n] = size(b); double = class(b)

      An implicit assumption exists that 'a' and 'b' are specified
      in the same reference frame. If this is not the case, the numerical
      result has no meaning.

   the call:

      vproj = cspice_vproj( a, b )

   returns:

      vproj   vector containing the projection(s) of 'a' onto 'b' ('vproj' is
              necessarily parallel to 'b'.)  If 'b' equals the zero vector
              then the zero vector will return as 'vproj'.

              [3,n] = size(vproj); double = class(vproj)

             'vproj' returns with the same vectorization measure, N, as
             'a' and 'b'

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.

      %
      % Define two vector sets.
      %
      a = [ [ 6, 6, 6]', ...
            [ 6, 6, 6]', ...
            [ 6, 6, 0]', ...
            [ 6, 0, 0]' ]

      b = [ [ 2, 0, 0]', ...
            [-3, 0, 0]', ...
            [ 0, 7, 0]', ...
            [ 0, 0, 9]' ]

      %
      % Calculate the projection.
      %
      p = cspice_vproj( a, b )

   MATLAB outputs:

      a =

           6     6     6     6
           6     6     6     0
           6     6     0     0


      b =

           2    -3     0     0
           0     0     7     0
           0     0     0     9


      p =

           6     6     0     0
           0     0     6     0
           0     0     0     0

Particulars


   None.

Required Reading


   For important details concerning this module's function, please refer to
   the CSPICE routine vproj_c.

   MICE.REQ

Version


   -Mice Version 1.0.0, 12-MAR-2012, EDW (JPL), SCK (JPL)

Index_Entries


   3-vector projection


Wed Apr  5 18:00:36 2017