Aller au contenu

Mathc complexes/01m

Un livre de Wikilivres.

Application

Installer et compiler ce fichier dans votre répertoire de travail.

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A         = r_skew_hermitian_mZ(i_mZ(r,r), 999);
double **EigsVector=                     i_mZ(r,r);

  clrscrn();
  printf(" The nonzero eigenvalues of a Skew-Hermitian matrix"
         " matrix are non-real.\n\n");
  printf(" Copy/Past into the octave windows \n\n");
  p_Octave_mZ(A,"a",P0,P0);
  printf(" [V, E] = eigs (a,%d) \n\n",r);
   
  f_mZ(A);
  f_mZ(EigsVector);
}
/* ------------------------------------ */
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-hermitienne sont imaginaires.


Exemple de sortie écran :

 The nonzero eigenvalues of a Skew-Hermitian matrix matrix are non-real.

 Copy/Past into the octave windows 

 a=[
+0+6*i,+6+16*i,-10+15*i,+10+3*i,+2-5*i;
-6+16*i,+0-10*i,-6-10*i,+5+13*i,-3-9*i;
+10+15*i,+6-10*i,+0-2*i,+1+8*i,+4-11*i;
-10+3*i,-5+13*i,-1+8*i,+0+2*i,-1-2*i;
-2-5*i,+3-9*i,-4-11*i,+1-2*i,+0-8*i]

 [V, E] = eigs (a,5) 


 Press   return to continue
 Press X return to stop