Aller au contenu

Mathc complexes/a200

Un livre de Wikilivres.


Application


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


c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define    RA            R3
#define    CA            C3
/* ------------------------------------ */
int main(void)
{
double a[RA*(CA*C2)] ={ 1,2,  3,4,  5,6,
                        5,4,  1,3,  6,8,
                        7,2,  5,1,  1,1};
                        
double **A = ca_A_mZ(a,i_mZ(RA,CA));

int minor_r = R1;
int minor_c = C1;

  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");
  stop();
  
  f_mZ(A);

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


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

 cofactor(R1,C1) =   -24  -42i 

 Press return to continue.