Aller au contenu

Mathc complexes/a235

Un livre de Wikilivres.


Application


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


c00b.c
/* ------------------------------------ */
/*  Save as :  c00b.c                   */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define   RB R3
#define   CB C2

#define   RU R2
#define   CU C1
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double bu_s[RB*((CB+CU)*C2)]={
    +2, 2,   +1, 5,  -13, +5, 
    +2, 0,   +3, 5,  -13, -3,   
    +6, 2,   +4, 1,  +15,+46
};

double **Bu_s =   ca_A_mZ(bu_s,i_Abr_Ac_bc_mZ(RB,CB,CU));
double **B    = c_Ab_A_mZ(Bu_s,i_mZ(RB,CB));
double **U_s  = c_Ab_b_mZ(Bu_s,i_mZ(RB,CU));

  clrscrn();
  printf(" B is the change of basis matrix for \"B\" \n\n"
         " Find the coordinate of U in the \"B\" basis.\n\n"
         " B :   ");
  p_mZ(B,  S7,P2, S6,P2, C7);
  printf( " U_s :   the coordinate of U in the Standard basis");
  p_mZ(U_s, S7,P2, S6,P2, C7);

  printf(" Bu_s :");
  p_mZ(Bu_s,S7,P2,S6,P2,C7);
  stop();

  clrscrn();
  printf(" Bu_s :       gj4_mZ(Bu_s);");
  gj4_mZ(Bu_s);
  p_mZ(Bu_s,S7,P2,S6,P2,C7);
  printf( " U_s :   the coordinate of U in the Standard basis");
  p_mZ(U_s,S8,P2,S6,P2,C7);
  printf(" U_b :   the coordinate of U in the \"B\" basis\n"
         "  %+.2f  %+.2f  \n"
         "  %+.2f  %+.2f\n\n", Bu_s[R1][C5],Bu_s[R1][C6], 
                               Bu_s[R2][C5],Bu_s[R2][C6]);
  stop();
   
  f_mZ(Bu_s);
  f_mZ(U_s);
  f_mZ(B);
  
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Matrice de passage inversible :

Soit B la matrice de changement de base de B
Trouver les coordonnées de U dans la base B : 
       B * U_b = U_s                       A*x = b
       
       B|U_s                               A|b
       
Exemple de sortie écran :
 ------------------------------------ 
 B is the change of basis matrix for "B" 

 Find the coordinate of U in the "B" basis.

 B :   
  +2.00 +2.00i   +1.00 +5.00i 
  +2.00 +0.00i   +3.00 +5.00i 
  +6.00 +2.00i   +4.00 +1.00i 

 U_s :   the coordinate of U in the Standard basis
 -13.00 +5.00i 
 -13.00 -3.00i 
 +15.00+46.00i 

 Bu_s :
  +2.00 +2.00i   +1.00 +5.00i  -13.00 +5.00i 
  +2.00 +0.00i   +3.00 +5.00i  -13.00 -3.00i 
  +6.00 +2.00i   +4.00 +1.00i  +15.00+46.00i 

 Press return to continue. 

 ------------------------------------ 
 Bu_s :       gj4_mZ(Bu_s);
  +1.00 -0.00i   +0.00 +0.00i   +7.00 +4.00i 
  -0.00 +0.00i   +1.00 -0.00i   -4.00 +3.00i 
  +0.00 +0.00i   +0.00 +0.00i   +0.00 +0.00i 

 U_s :   the coordinate of U in the Standard basis
  -13.00 +5.00i 
  -13.00 -3.00i 
  +15.00+46.00i 

 U_b :   the coordinate of U in the "B" basis
  +7.00  +4.00  
  -4.00  +3.00

 Press return to continue.