Mathc complexes/a116
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define FACTOR_E +1.E-2
#define RCA RC4
#define Pn 3
/* ------------------------------------ */
/* ------------------------------------ */
double f(
double x)
{
return(pow(x,1./Pn));
}
char feq[] = "x**1/Pn";
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double **A = rcsymmetric_mZ(i_mZ(RCA,RCA),99);
double **A_Pn = i_mZ(RCA,RCA);
double **EigsVector = i_mZ(RCA,RCA);
double **T_EigsVector = i_mZ(RCA,RCA);
double **T = i_mZ(RCA,RCA);
double **EigsValue = i_mZ(RCA,RCA);
double **SqrtEigsValue = i_mZ(RCA,RCA);
clrscrn();
printf(" A :");
p_mZ(A, S7,P0, S7,P0, C6);
/* EigsVector and T_EigsVector*/
eigs_V_mZ(A,EigsVector,FACTOR_E);
ctranspose_mZ(EigsVector,T_EigsVector);
/* EigsValue = T_EigsVector * A * EigsVector */
mul_mZ(T_EigsVector,A,T);
mul_mZ(T,EigsVector,EigsValue);
f_eigs_mZ(f,EigsValue,SqrtEigsValue);
/* inv : EigsVector * sqrt(EEigsVectoralue) * T_EigsVector*/
mul_mZ(EigsVector,SqrtEigsValue,T);
mul_mZ(T,T_EigsVector,A_Pn);
printf(" A_Pn = A**(1/%d) = EigsVector * EigsValue**(1/%d)"
" * T_EigsVector\n", Pn, Pn);
p_mZ(A_Pn, S9,P3, S8,P3, C6);
printf(" A = A_Pn**%d ",Pn);
p_mZ(pow_mZ(Pn,A_Pn,A), S7,P0, S7,P0, C6);
f_mZ(A);
f_mZ(A_Pn);
f_mZ(EigsVector);
f_mZ(T_EigsVector);
f_mZ(T);
f_mZ(SqrtEigsValue);
f_mZ(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} 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 :
A**1/3 = V EValue**1/3 T_V
Exemple de sortie écran :
------------------------------------
A :
+14358 +0i -8031 +363i +6369 +2393i -14091 +4643i
-8031 -363i +27605 +0i +5916 -4738i +12435 -12393i
+6369 -2393i +5916 +4738i +24326 +0i -6520 -4144i
-14091 -4643i +12435 +12393i -6520 +4144i +24540 +0i
A_Pn = A**(1/3) = EigsVector * EigsValue**(1/3) * T_EigsVector
+19.695 -0.000i -1.763 +1.044i +2.797 +2.438i -8.801 +2.977i
-1.763 -1.044i +27.076 -0.000i +2.919 -3.226i +6.164 -6.343i
+2.797 -2.438i +2.919 +3.226i +27.204 +0.000i -3.990 -3.085i
-8.801 -2.977i +6.164 +6.343i -3.990 +3.085i +22.642 +0.000i
A = A_Pn**3
+14358 -0i -8031 +363i +6369 +2393i -14091 +4643i
-8031 -363i +27605 -0i +5916 -4738i +12435 -12393i
+6369 -2393i +5916 +4738i +24326 +0i -6520 -4144i
-14091 -4643i +12435 +12393i -6520 +4144i +24540 +0i
Press return to continue
Press X to stop