Aller au contenu

Mathc complexes/08w

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 RCA          RC4  
/* ------------------------------------ */       
/* ------------------------------------ */
int main(void)
{                          
double NVN[RCA*RCA] ={   
+0.730296743340, -0.258198889747, -0.272165526976, -0.447213595500, 
+0.547722557505, -0.258198889747, -0.680413817440, -0.596284794000, 
-0.182574185835, +0.516397779494, +0.544331053952, +0.298142397000, 
-0.365148371670, -0.774596669241, -0.408248290464, -0.596284794000 
};
 
double E[RCA*RCA] ={   
+1, 0, +0, +0, 
+0, 1, +0, +0, 
+0, 0, +1, +0, 
+0, 0, +0, +0   
};
                       
double **Nvn    =  ca_A_mRZ(NVN,       i_mZ(RCA,RCA));
double **invNvn = invgj_mZ(Nvn,        i_mZ(RCA,RCA));

double **EValue = ca_A_mRZ(E,          i_mZ(RCA,RCA));

double **T      =   mul_mZ(Nvn,EValue, i_mZ(RCA,RCA));
double **A      =   mul_mZ(T,  invNvn, i_mZ(RCA,RCA));

  clrscrn(); 
  printf(" Nv1,Nv2,Nv3: The normalized hyperplan vectors\n" 
         "         Nv4: The normalized projector vector\n\n");
  
  printf(" Nvn:  v1        v2        v3        v4");
  p_mRZ(Nvn, S8,P6, C4);     

  printf(" EValue1   EValue2   EValue3   EValue4");
  p_mRZ(EValue, S9,P6, C4); 
 
  printf(" Copy this code into the files c00c.c and c00d.c\n\n"
         " A = Nvn EValue invNvn");
  P_mRZ(A, S8,P12, C4);
  stop();
  
  f_mZ(A);
  f_mZ(Nvn);
  f_mZ(invNvn);
  f_mZ(EValue);
  f_mZ(T);
  
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Vous calculez la matrice A qui projette l'hyperespace dans la direction du vecteur propre (Nv4) sur un hyperplan déterminé par les vecteurs propres (Nv1, Nv2, Nv3). Ensuite, vous devez copier cette matrice dans les fichiers c00c.c et c00d.c

Exemple de sortie écran :

 Nv1,Nv2,Nv3: The normalized hyperplan vectors
         Nv4: The normalized projector vector

 Nvn:  v1        v2        v3        v4
+0.730297 -0.258199 -0.272166 -0.447214 
+0.547723 -0.258199 -0.680414 -0.596285 
-0.182574 +0.516398 +0.544331 +0.298142 
-0.365148 -0.774597 -0.408248 -0.596285 

 EValue1   EValue2   EValue3   EValue4
+1.000000 +0.000000 +0.000000 +0.000000 
+0.000000 +1.000000 +0.000000 +0.000000 
+0.000000 +0.000000 +1.000000 +0.000000 
+0.000000 +0.000000 +0.000000 +0.000000 

 Copy this code into the files c00c.c and c00d.c

 A = Nvn EValue invNvn
+0.81250000, -0.65625000, -1.40625000, -0.65625000, 
-0.25000000, +0.12500000, -1.87500000, -0.87500000, 
+0.12500000, +0.43750000, +1.93750000, +0.43750000, 
-0.25000000, -0.87500000, -1.87500000, +0.12500000  

 Press return to continue.