Mathc matrices/c12fn4
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = rskewsymmetric_mR(i_mR(r,r),999.);
double **EigsVector= i_mR(r,r);
double **EigsValue = i_mR(r,C1);
clrscrn();
printf(" The nonzero eigenvalues of a skew-symmetric"
" matrix are non-real.\n\n");
printf(" Copy/Past into the octave windows \n\n");
p_Octave_mR(A,"a",P0);
printf(" [V, E] = eigs (a,%d) \n\n",r);
f_mR(A);
f_mR(EigsVector);
f_mR(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R4)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Les valeurs propres d'une matrice anti-symétrique sont imaginaires
Exemple de sortie écran :
The nonzero eigenvalues of a skew-symmetric matrix are non-real.
Copy/Past into the octave windows
a=[
+0,-157,-703,-879;
+157,+0,+332,-42;
+703,-332,+0,+515;
+879,+42,-515,+0]
[V, E] = eigs (a,4)
Press return to continue
Press X return to stop
a=[
+0,-157,-703,-879;
+157,+0,+332,-42;
+703,-332,+0,+515;
+879,+42,-515,+0]
>> [V, E] = eigs (a,4)
V =
0.6374 + 0i 0.6374 - 0i 0.0961 + 0.2906i 0.0961 - 0.2906i
-0.1054 - 0.0166i -0.1054 + 0.0166i 0.6990 + 0i 0.6990 - 0i
-0.2149 - 0.4646i -0.2149 + 0.4646i -0.0434 + 0.4858i -0.0434 - 0.4858i
0.1907 - 0.5328i 0.1907 + 0.5328i 0.0161 - 0.4237i 0.0161 + 0.4237i
E =
Diagonal Matrix
-0.00 + 1251.15i 0 0 0
0 -0.00 - 1251.15i 0 0
0 0 0.00 + 321.47i 0
0 0 0 0.00 - 321.47i