Application


Installer et compiler ces fichiers dans votre répertoire de travail.


cof_z.c
/* ------------------------------------ */
/*  Save as :   cof_z.c                 */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mZ(i_mZ(r,r),9.);

int minor_r = rp_I(r);
int minor_c = rp_I(r);

  clrscrn();
  printf(" A :");
  p_mZ(A, S5,P0, S4,P0, C6);

  printf(" cofactor(R%d,C%d) = ", minor_r, minor_c);

  minor_c = minor_c*C2-C1;
  /* col*C2 : a number has two columns    */                         
  /*    -C1 : The real part of the number */

  p_Z(cofactor_Z(A,minor_r,minor_c), S5,P0, S5,P0);printf("\n\n");
  f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
  fun(rp_I(RC5)+RC1);

} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


On calcul un cofacteur.



Exemple de sortie écran :
 A :
   -7   -1i    +2   +6i    +6   -1i    +4   -5i 
   +4   +2i    +8   -1i    -5   +8i    +2   -3i 
   +6   -5i    -1   -5i    -3   -3i    -9   +2i 
   -9   -3i    +8   +4i    -3   +8i    -5   -9i 

 cofactor(R4,C1) =  -406  -57i 


 Press return to continue
 Press X      to stop