Mathc complexes/a47
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b.c |
---|
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define FACTOR_E +1.E-2
#define RCA RC4
/* ------------------------------------ */
/* ------------------------------------ */
void fun(int r)
{
double **A = rcsymmetric_mZ(i_mZ(RCA,RCA),99);
double **V = i_mZ(RCA,RCA);
double **cV_T = i_mZ(RCA,RCA);
double **T = i_mZ(RCA,RCA);
double **EValue = i_mZ(RCA,C1);
double **EigsValue = i_mZ(RCA,RCA);
clrscrn();
printf(" Copy/Past into the octave windows \n\n\n");
p_Octave_mZ(A,"a",P0,P0);
printf(" [V, E] = eigs (a,%d) \n\n\n",RCA);
printf(" A :");
p_mZ(A, S8,P0, S6,P0, C4);
stop();
clrscrn();
/* V and cV_T*/
eigs_V_mZ(A,V,FACTOR_E);
printf(" V :");
pE_mZ(V, S12,P4, S12,P4, C3);
printf(" cV_T :");
pE_mZ(ctranspose_mZ(V,cV_T), S12,P4, S12,P4, C3);
stop();
clrscrn();
eigs_mZ(A,EValue);
printf(" EigsValue :");
p_mZ(EValue, S12,P4, S8,P4, C3);
/* EigsValue = cV_T * A * V */
mul_mZ(cV_T,A,T);
mul_mZ(T,V,EigsValue);
printf(" EigsValue = cV_T * A * V");
p_mZ(EigsValue, S12,P4, S8,P4, C3);
f_mZ(A);
f_mZ(V);
f_mZ(cV_T);
f_mZ(EigsValue);
f_mZ(EValue);
f_mZ(T);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(R3);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Avec les matrices réelles nous avons calculer les vecteurs et valeurs propres des matrices symétriques. Avec les matrices complexes nous allons calculer les vecteurs et valeurs propres des matrices symétriques conjuguées.
Contrôle du facteur :
- FACTOR_E ..... +1.E-1 ......... -9 < x < 9
- FACTOR_E ..... +1.E-2 ....... -99 < x < 99
- FACTOR_E ..... +1.E-3 ..... -999 < x < 999
Nous allons étudier une des propriétés des valeurs propres et des vecteurs propres :
EigsValue = cV_T * A * V
Exemple de sortie écran :
------------------------------------
Copy/Past into the octave windows
a=[
+26723+0*i,+6300+372*i,-5754-11448*i;
+6300-372*i,+14814+0*i,-4606-1775*i;
-5754+11448*i,-4606+1775*i,+7052+0*i]
[V, E] = eigs (a,3)
A :
+26723 +0i +6300 +372i -5754-11448i
+6300 -372i +14814 +0i -4606 -1775i
-5754+11448i -4606 +1775i +7052 +0i
Press return to continue.
------------------------------------
V :
-4.2555e-01 -7.2220e-01i +2.9361e-01 -1.9581e-01i +1.4145e-01 +3.9087e-01i
-2.3471e-01 -2.4594e-01i -4.2882e-01 +8.0912e-01i +2.0638e-01 -5.7180e-02i
+4.2634e-01 -2.6625e-17i +1.9205e-01 +0.0000e+00i +8.8394e-01 +0.0000e+00i
cV_T :
-4.2555e-01 +7.2220e-01i -2.3471e-01 +2.4594e-01i +4.2634e-01 +2.6625e-17i
+2.9361e-01 +1.9581e-01i -4.2882e-01 -8.0912e-01i +1.9205e-01 -0.0000e+00i
+1.4145e-01 -3.9087e-01i +2.0638e-01 +5.7180e-02i +8.8394e-01 -0.0000e+00i
Press return to continue.
------------------------------------
EigsValue :
+35747.4376 -0.0000i
+12733.1027 -0.0000i
+108.4598 +0.0000i
EigsValue = cV_T * A * V
+35747.4376 +0.0000i -0.0000 -0.0000i +0.0000 +0.0000i
-0.0000 +0.0000i +12733.1027 +0.0000i +0.0000 -0.0000i
+0.0000 -0.0000i +0.0000 +0.0000i +108.4598 +0.0000i
Press return to continue
Press X to stop