Linear Algebra and the C Language/a0i3


Install and compile this file in your working directory.

/* ------------------------------------ */
/*  Save as :  c00d.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/Paste 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;
}
/* ------------------------------------ */
/* ------------------------------------ */
The eigenvalues ​​of an anti-symmetric matrix are imaginary

Screen output example:

                                                                                       
 The nonzero eigenvalues of a skew-symmetric matrix are non-real.

 Copy/Paste into the octave windows 

 a=[
+0,+662,+544,-833,-634;
-662,+0,+604,-792,-805;
-544,-604,+0,+445,+659;
+833,+792,-445,+0,+558;
+634,+805,-659,-558,+0]

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


 Press   return to continue
 Press X return to stop