mequ_c |
Table of contents
Proceduremequ_c ( Matrix equal to another, 3x3 ) void mequ_c ( ConstSpiceDouble m1 [3][3], SpiceDouble mout[3][3] ) AbstractSet one double precision 3x3 matrix equal to another. Required_ReadingNone. KeywordsASSIGNMENT MATRIX Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- m1 I Input matrix. mout O Output matrix equal to `m1'. Detailed_Inputm1 is an arbitrary input 3x3 matrix. There are no restrictions on what it may contain. Detailed_Outputmout is a 3x3 matrix set to be equal to `m1'. ParametersNone. ExceptionsError free. FilesNone. ParticularsNone. ExamplesThe numerical results shown for this example may differ across platforms. The results depend on the SPICE kernels used as input, the compiler and supporting libraries, and the machine specific arithmetic implementation. 1) This trivial example demonstrates how to use mequ_c to assign one matrix to another. Example code begins here. /. Program mequ_ex1 ./ #include <stdio.h> #include "SpiceUsr.h" int main( ) { /. Local variables. ./ SpiceDouble mout [3][3]; SpiceInt i; /. Define `m1'. ./ SpiceDouble m1 [3][3] = { {0.0, -1.0, 0.0}, {1.0, 0.0, 0.0}, {0.0, 0.0, 1.0} }; /. Assign `m1' to `mout' and print `mout'. ./ mequ_c ( m1, mout ); printf( "MOUT:\n" ); for ( i = 0; i < 3; i++ ) { printf( "%16.7f %15.7f %15.7f\n", mout[i][0], mout[i][1], mout[i][2] ); } return ( 0 ); } When this program was executed on a Mac/Intel/cc/64-bit platform, the output was: MOUT: 0.0000000 -1.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000 0.0000000 1.0000000 RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) W.M. Owen (JPL) E.D. Wright (JPL) Version-CSPICE Version 1.0.1, 04-JUL-2021 (JDR) Edited the header to comply with NAIF standard. Added complete code example based on existing example. -CSPICE Version 1.0.0, 29-JUN-1999 (EDW) (WMO) Index_Entriesequal to another 3x3_matrix |
Fri Dec 31 18:41:09 2021