*/
Got something to write about? Check out our Article Builder.
*/

View \Ainv02.c

Application of the identity matrix II. v05

Submitted By: xhunga
Rating: starstar (Rate It)


/* invid03.c                          freeware                 [[Email Removed]]
*/


/* --------------------------------- INCLUDES ------------------------------- */
#include "xa_hfile.h"

/* --------------------------------- MAIN ----------------------------------- */
 main()
{
double pbA[4][4*TWOCOL]=
{
1,3, 3,2, 3,1, 1,1,
2,1, 1,4, 1,3, 1,2,
2,3, 2,3, 1,1, 4,1,
3,1, 2,3, 1,2, 1,2
};
matrix mA={4,4*TWOCOL,&pbA[0][0]};

double pbID  [4][4*TWOCOL]; matrix mID   = {4,4*TWOCOL,&pbID  [0][0]};
double pbinvA[4][4*TWOCOL]; matrix minvA = {4,4*TWOCOL,&pbinvA[0][0]};
double pbAID [4][8*TWOCOL]; matrix mAID  = {4,8*TWOCOL,&pbAID [0][0]};
/*-------------------------------- PROGRAM ---------------------------------- */
 printf("\n The matrix mA \n");
 printmF(&mA);

 printf("\n");
 invidF2(&mA,&mAID);
 printf("The inverse matrix is : \n");
 copyinv(&mAID,&minvA);
 printmF(      &minvA);

 printf("\n mA * minvA give \n");
 multmF(&mA, &minvA,&mID);
 printmF(           &mID);

 printf("\n Press return to continue");
 getchar();

 return 0;
}

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.