*/
Want to see what people are talking about? See the latest forum posts.
*/

View \Cid01.c

Application of the identity matrix II. v05

Submitted By: xhunga
Rating: starstar (Rate It)


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


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

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

double pb[3][3*TWOCOL]=
{
  1,1,   36,2-39,3,
  0,1,    1,1,   33,4,
  0,1,    0,1,    1,1,
};
matrix m={3,3*TWOCOL,&pb[0][0]};

double pbAT [3][3*TWOCOL];  matrix mAT  = {3,3*TWOCOL,&pbAT [0][0]};
double pbT  [3][3*TWOCOL];  matrix mT   = {3,3*TWOCOL,&pbT  [0][0]};

double pbID [3][3*TWOCOL];  matrix mID  = {3,3*TWOCOL,&pbID [0][0]};
double pbIDT[3][3*TWOCOL];  matrix mIDT = {3,3*TWOCOL,&pbIDT[0][0]};
double pbID0[3][3*TWOCOL];  matrix mID0 = {3,3*TWOCOL,&pbID0[0][0]};
double pbID1[3][3*TWOCOL];  matrix mID1 = {3,3*TWOCOL,&pbID1[0][0]};

/*-------------------------------- PROGRAM ---------------------------------- */
 printf(" The matrix mA \n");
 printmF(&m);
 copymF(&m,&mAT);

idF3a(&mID,&m,2);copymF(&mID,&mID0);printf("mID0");printmF(&mID0);getchar();
idF3a(&mID,&m,1);copymF(&mID,&mID1);printf("mID1");printmF(&mID1);getchar();

 printf("\n mID = mID1 * mID0 : \n");
 multmF(&mID1, &mID0, &mID);
 printmF(&mID );
 getchar();

 copymF(&mAT,&m);
 printf("\n mID * mA : \n");
 multmF(&mID,&m,&mT);
 printmF(       &mT);

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

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.