Application


Installer et compiler ces fichiers dans votre répertoire de travail.


c00a.c
/* ------------------------------------ */
/*  Save as :  c00a.c                   */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define   RA R2
#define   CA C2

#define   RX R2
#define   CX C1
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double a[RA*CA]={
    +3, -2,  
    +2, -2
};

double x_B[RX*CX]={
    +1,   
    +2
};

double b[RA*CA]={
    +2, +4,   
    +3, +5
};

double **A   = ca_A_mR(a, i_mR(RA,CA));
double **B   = ca_A_mR(b, i_mR(RA,CA));

double **X_B = ca_A_mR(x_B,  i_mR(RX,CX));

double **invB  =  inv_mR(B, i_mR(RA,CA));
double **invBA =            i_mR(RA,CA);
double **D     =            i_mR(RA,CA);
double **DX_B  =            i_mR(RA,CX);

  clrscrn();
  printf(" In the B basis\n\n"
         " Find the linear application [T(x_B)]_B = D*x_B \n\n"
         " D =  InvB A B   ");
  mul_mR(invB,A,invBA);       
  mul_mR(invBA,B,D);
  p_mR(D,S7,P2,C7); 
  printf(" x_B : ");
  p_mR(X_B,S7,P2,C7);
  printf(" [T(x_B)]_B = D x_B");
  p_mR(mul_mR(D,X_B,DX_B),S8,P2,C7);
  stop();   

  f_mR(A);
  f_mR(X_B);
  
  f_mR(B);
  f_mR(invB);  
  f_mR(invBA);  
  f_mR(D);
  f_mR(DX_B);
    
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
 Calculons  [T(x)]_B = D* [x]_B en base B.
Exemple de sortie écran :
 In the B basis

 Find the linear application [T(x_B)]_B = D*x_B 

 D =  InvB A B   
  -4.00   -9.00 
  +2.00   +5.00 

 x_B : 
  +1.00 
  +2.00 

 [T(x_B)]_B = D x_B
  -22.00 
  +12.00 

 Press return to continue.