Mathc matrices/04b
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
|---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RCA RC6
/* ------------------------------------ */
void fun(void)
{
double d[RCA*RCA] ={
+1, +0, +0, +0, +0, +0,
+0, +1, +0, +0, +0, +0,
+0, +0, +1, +0, +0, +0,
+0, +0, +0, +1, +0, +0,
+0, +0, +0, +0, +1, +0,
+0, +0, +0, +0, +0, +0
};
double **D = ca_A_mR(d, i_mR(RCA,RCA));
double **A = rdefpos_diag_mR(D, i_mR(RCA,RCA),99);
clrscrn();
printf(" A:");
p_mR(A, S8,P12, C4);
printf(" D = EValue:");
p_mR(D, S8,P2, C6);
stop();
clrscrn();
printf(" Choose your eigenvalues (D),"
" and copy these lines into the next C file\n\n\n"
" A:");
P_mR(A, S8,P12, C6);
f_mR(A);
f_mR(D);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
'Choisir les valeurs propres :'
Exemple de sortie écran :
A:
+0.853214156635 +0.223697489745 -0.130729221324 -0.180799128390
+0.223697489745 +0.659091328080 +0.199227650133 +0.275532777834
-0.130729221324 +0.199227650133 +0.883570997610 -0.161021858298
-0.180799128390 +0.275532777834 -0.161021858298 +0.777306012096
-0.123227848855 +0.187795769834 -0.109748190676 -0.151782264254
-0.101171318892 +0.154182239592 -0.090104382248 -0.124614784740
-0.123227848855 -0.101171318892
+0.187795769834 +0.154182239592
-0.109748190676 -0.090104382248
-0.151782264254 -0.124614784740
+0.896549269431 -0.084934103365
-0.084934103365 +0.930268236148
D = EValue:
+1.00 +0.00 +0.00 +0.00 +0.00 +0.00
+0.00 +1.00 +0.00 +0.00 +0.00 +0.00
+0.00 +0.00 +1.00 +0.00 +0.00 +0.00
+0.00 +0.00 +0.00 +1.00 +0.00 +0.00
+0.00 +0.00 +0.00 +0.00 +1.00 +0.00
+0.00 +0.00 +0.00 +0.00 +0.00 +0.00
Press return to continue.
Choose your eigenvalues (D), and copy these lines into the next C file
A:
+0.853214156635, +0.223697489745, -0.130729221324, -0.180799128390, -0.123227848855, -0.101171318892,
+0.223697489745, +0.659091328080, +0.199227650133, +0.275532777834, +0.187795769834, +0.154182239592,
-0.130729221324, +0.199227650133, +0.883570997610, -0.161021858298, -0.109748190676, -0.090104382248,
-0.180799128390, +0.275532777834, -0.161021858298, +0.777306012096, -0.151782264254, -0.124614784740,
-0.123227848855, +0.187795769834, -0.109748190676, -0.151782264254, +0.896549269431, -0.084934103365,
-0.101171318892, +0.154182239592, -0.090104382248, -0.124614784740, -0.084934103365, +0.930268236148
Press return to continue
Press X return to stop