Aller au contenu

Mathc complexes/a71

Un livre de Wikilivres.


Applications

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

c00d.c
/* ------------------------------------ */
/*  Save as:  c00d.c                    */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define FACTOR_E  +1.E-1    
#define ARRAY     A3
/* ------------------------------------ */
#define RC        RC3
/* ------------------------------------ */
void fun(void)
{
double **A         = rcsymmetric_mZ(        i_mZ(RC,RC),99);
double **AEVect    =      eigs_V_mZ(A,      i_mZ(RC,RC),FACTOR_E);
double **InvAEVect =  ctranspose_mZ(AEVect, i_mZ(RC,RC));

double **T         =                        i_mZ(RC,RC);

double **b [ARRAY];
double **r [ARRAY];
double **br[ARRAY];

int i;

  for(i=A0; i<ARRAY; i++)
     {
      b[i]  = c_c_mZ(   AEVect,i+C1, i_mZ(RC,C1),C1);
      r[i]  = c_r_mZ(InvAEVect,i+R1, i_mZ(R1,RC),R1);
      
      br[i] = mul_mZ(b[i],r[i],      i_mZ(RC,RC)); 
      }
      
  clrscrn();
  printf(" A:");
  p_mZ(A, S7,P0,S6,P0,C7);

  printf(" eigenvectors of A");
  p_mZ(AEVect, S5,P4,S5,P4,C7);

  printf(" Conjugate transpose of Eigenvector of A");
  p_mZ(InvAEVect, S5,P4,S5,P4,C7);
  stop();

  clrscrn(); 
  printf(" The bnrn are projectors.         \n"
         " Several consecutive projections\n\n"
         "                  bnrn**p       \n\n"
         " give the same result         \n\n\n"
         " b1r1:");
  p_mZ(br[0], S5,P4,S5,P4,C7);
  
  pow_mZ(2, br[0], T);  
  printf(" b1r1**2 = b1r1");
  p_mZ(T, S5,P4,S5,P4,C7);
   
  pow_mZ(6, br[0], T);  
  printf(" b1r1**6 = b1r1");
  p_mZ(T, S5,P4,S5,P4,C7);
  stop();
  

  clrscrn();
  printf(" The bnrn are projectors.         \n"
         " Several consecutive projections\n\n"
         "                  bnrn**p       \n\n"
         " give the same result         \n\n\n"
         " b2r2:");
  p_mZ(br[1], S5,P4,S5,P4,C7);
  
  pow_mZ(2, br[1], T);  
  printf(" b2r2**2 = b2r2");
  p_mZ(T, S5,P4,S5,P4,C7);
   
  pow_mZ(6, br[1], T);  
  printf(" b2r2**6 = b2r2");
  p_mZ(T, S5,P4,S5,P4,C7);
  stop();
  
  clrscrn();
  printf(" The bnrn are projectors.         \n"
         " Several consecutive projections\n\n"
         "                  bnrn**p       \n\n"
         " give the same result         \n\n\n"
         " b3r3:");
  p_mZ(br[2], S5,P4,S5,P4,C7);
  
  pow_mZ(2, br[2], T);  
  printf(" b3r3**2 = b3r3");
  p_mZ(T, S5,P4,S5,P4,C7);
   
  pow_mZ(6, br[2], T);  
  printf(" b3r3**6 = b3r3");
  p_mZ(T, S5,P4,S5,P4,C7);
  
  f_mZ(A);
  f_mZ(AEVect);
  f_mZ(InvAEVect);    

  f_mZ(T);

  for(i=A0; i<ARRAY; i++)
     {
       f_mZ (b[i]);
       f_mZ( r[i]);
       f_mZ(br[i]);               
     } 
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
 fun();

} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Nous voyons une des propriètés de la décomposition spectral:

* b1r1**2 = b1r1
* b1r1**4 = b1r1
* b1r1**6 = b1r1
 
Les b*r* sont des projecteurs. Si par exemple je projette le point P sur l'axe des x. P est sur l'axe des x. Une fois que P est sur l'axe de x, je peut le projeter une infinité de fois sur l'axe des x il ne bougera plus. Cela ce matérialise dans  notre cas par le faite b1r1**2 = b1r1, b1r1**3 = b1r1, ... b1r1**n = b1r1
Exemple de sortie écran :
 A:
 +21120    +0i   +4116 +2524i    -144 +2022i 
  +4116 -2524i  +30958    +0i   +9960 +4106i 
   -144 -2022i   +9960 -4106i  +17139    +0i 

 eigenvectors of A
+0.1297+0.2497i -0.8075-0.4928i +0.1610+0.0082i 
+0.7711+0.3478i +0.1934-0.0913i -0.4623-0.1578i 
+0.4530+0.0000i +0.2437-0.0000i +0.8575+0.0000i 

 Conjugate transpose of Eigenvector of A
+0.1297-0.2497i +0.7711-0.3478i +0.4530-0.0000i 
-0.8075+0.4928i +0.1934+0.0913i +0.2437+0.0000i 
+0.1610-0.0082i -0.4623+0.1578i +0.8575-0.0000i 

 Press return to continue. 


 The bnrn are projectors.         
 Several consecutive projections

                  bnrn**p       

 give the same result         


 b1r1:
+0.0792+0.0000i +0.1869+0.1474i +0.0588+0.1131i 
+0.1869-0.1474i +0.7156+0.0000i +0.3493+0.1576i 
+0.0588-0.1131i +0.3493-0.1576i +0.2052+0.0000i 

 b1r1**2 = b1r1
+0.0792+0.0000i +0.1869+0.1474i +0.0588+0.1131i 
+0.1869-0.1474i +0.7156+0.0000i +0.3493+0.1576i 
+0.0588-0.1131i +0.3493-0.1576i +0.2052+0.0000i 

 b1r1**6 = b1r1
+0.0792-0.0000i +0.1869+0.1474i +0.0588+0.1131i 
+0.1869-0.1474i +0.7156+0.0000i +0.3493+0.1576i 
+0.0588-0.1131i +0.3493-0.1576i +0.2052-0.0000i 

 Press return to continue. 


 The bnrn are projectors.         
 Several consecutive projections

                  bnrn**p       

 give the same result         


 b2r2:
+0.8949+0.0000i -0.1112-0.1690i -0.1968-0.1201i 
-0.1112+0.1690i +0.0457+0.0000i +0.0471-0.0223i 
-0.1968+0.1201i +0.0471+0.0223i +0.0594+0.0000i 

 b2r2**2 = b2r2
+0.8949+0.0000i -0.1112-0.1690i -0.1968-0.1201i 
-0.1112+0.1690i +0.0457+0.0000i +0.0471-0.0223i 
-0.1968+0.1201i +0.0471+0.0223i +0.0594+0.0000i 

 b2r2**6 = b2r2
+0.8949+0.0000i -0.1112-0.1690i -0.1968-0.1201i 
-0.1112+0.1690i +0.0457-0.0000i +0.0471-0.0223i 
-0.1968+0.1201i +0.0471+0.0223i +0.0594-0.0000i 

 Press return to continue. 


 The bnrn are projectors.         
 Several consecutive projections

                  bnrn**p       

 give the same result         


 b3r3:
+0.0260+0.0000i -0.0757+0.0216i +0.1380+0.0070i 
-0.0757-0.0216i +0.2386+0.0000i -0.3965-0.1353i 
+0.1380-0.0070i -0.3965+0.1353i +0.7354+0.0000i 

 b3r3**2 = b3r3
+0.0260+0.0000i -0.0757+0.0216i +0.1380+0.0070i 
-0.0757-0.0216i +0.2386+0.0000i -0.3965-0.1353i 
+0.1380-0.0070i -0.3965+0.1353i +0.7354+0.0000i 

 b3r3**6 = b3r3
+0.0260+0.0000i -0.0757+0.0216i +0.1380+0.0070i 
-0.0757-0.0216i +0.2386+0.0000i -0.3965-0.1353i 
+0.1380-0.0070i -0.3965+0.1353i +0.7354+0.0000i 


 Press   return to continue
 Press X return to stop