Aller au contenu

Mathc complexes/Fichiers c : test02c

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"
/* ------------------------------------ */  
/* ------------------------------------ */
double **xm0_mZ(
double **Zer
)
{
int r;
int c;

  for  (r=R1; r<Zer[R_SIZE][C0]; r++)
    for(c=R1; c<Zer[C_SIZE][C0]; c+=C2)
          {
           Zer[r][c   ] = 0.;
           Zer[r][c+C1] = 0.;
          }
          
return(Zer);
}
/* ------------------------------------ */ 
/* ------------------------------------ */
int main(void)
{  
double **M0 = m0_mZ(i_mZ(R3,C4));

  clrscrn();
  
  printf(" M0:");
  p_mZ(M0, S5,P0, S2,P0, C5);

  stop();
    
  f_mZ(M0);
        
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
La fonction met à zéro tous les coefficients de la matrice. 

Exemple de sortie écran :

 M0:
   +0+0i    +0+0i    +0+0i    +0+0i 
   +0+0i    +0+0i    +0+0i    +0+0i 
   +0+0i    +0+0i    +0+0i    +0+0i 

 Press return to continue.