*/
Love this site? Hate it? Leave us some comments.
*/

View \Aid02.c

Application of the identity matrix II. v05

Submitted By: xhunga
Rating: starstar (Rate It)


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


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

/* --------------------------------- MAIN ----------------------------------- */
 main()
{

double pbA[4][4*TWOCOL]=
{
 1,1,     9, 4,     9,2,   3,2,
 0,1,   -17, 4,   -26,3-5,2,
 0,1,    -5, 6,    -2,1,   3,1,
 0,1,   -73,12,   -13,1-4,1,

};
matrix mA={4,4*TWOCOL,&pbA[0][0]};

double pbID1[4][   4*TWOCOL]=
{
  1,1,   0, 10,10,1,
  0,1,   1, 10,10,1,
  0,1,   5, 61,10,1,
  0,173,120,11,1,
};
matrix  mID1 = {4, 4*TWOCOL,&pbID1[0][0]};

double pbID2[4][   4*TWOCOL]=
{
  1,1,        0, 1,     0,10,1,
  0,1,   1*(-4),17* 10,10,1,
  0,1,   5*(-4),17* 61,10,1,
  0,173*(-4),17*120,11,1,
};
matrix  mID2 = {4, 4*TWOCOL,&pbID2[0][0]};

double pbB[4][4*TWOCOL];matrix  mB = {4,4*TWOCOL,&pbB[0][0]};

/*-------------------------------- PROGRAM ---------------------------------- */
 printf("\n The matrix mA : \n");
 printmF(&mA );
 printf("\n");
 printf(" a) If you copy all the values below the pivot    \n ");
 printf("    in the identity matrix. And take the opposite.\n ");
 printmF(&mID1);
 printf("\n");
 printf(" b) If you multiply all these values, plus the pivot,   \n ");
 printf("    by the inverse of the pivot value, of a matrix mA :\n ");
 printmF(&mID2);

 getchar();

 printf(" And now if you multiply this matrix by mA :  \n\n");
 printf(" a) The pivot equal 1 (1/1)\n");
 printf(" b) All the values below the pivot will be equal to 0 (0/1)  \n");
 printf(\n");
 multmF(&mID2,&mA,&mB);
 printmF(         &mB);

 printf("\n\n\n\n\n\n\n");
 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.