Aller au contenu

Mathc complexes/08y

Un livre de Wikilivres.


Application

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

c00d.c
/* ------------------------------------ */
/*  Save as :   c00d.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */   
#define RCA          RC4  
/* ------------------------------------ */       
/* ------------------------------------ */
int main(void)
{                          
double a[RCA*RCA] ={   
+0.81250000, -0.65625000, -1.40625000, -0.65625000, 
-0.25000000, +0.12500000, -1.87500000, -0.87500000, 
+0.12500000, +0.43750000, +1.93750000, +0.43750000, 
-0.25000000, -0.87500000, -1.87500000, +0.12500000  
};
/* You can choose the value of the point P */
double P[RCA*C1] ={   
+2,
+5,
+6,
+3                                                                                                                           
};
                       
double **A  =   ca_A_mRZ(a, i_mZ(RCA,RCA));
double **p  =   ca_A_mRZ(P, i_mZ(RCA,C1));
double **Pp =   mul_mZ(A,p, i_mZ(RCA,C1));;

  clrscrn();
  printf(" A :");
  p_mRZ(A, S9,P8, C4); 
  
  printf(" You can choose the value of the point p\n\n"
         " p:");
  p_mRZ(p, S9,P8, C4); 
 
  printf(" The projection of p on the hyperplan defined by v1,"
         " v2 and v3.\n\n"
         " Pp:            Copy this matrix into c00e.c");
  P_mRZ(Pp, S15,P12, C4);      
  stop();
 
  f_mZ(A);
  f_mZ(p);
  f_mZ(Pp);
  
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Vous pouvez calculer la projection d'un point P sur l'hyperplan.

Exemple de sortie écran :

 A :
+0.81250000 -0.65625000 -1.40625000 -0.65625000 
-0.25000000 +0.12500000 -1.87500000 -0.87500000 
+0.12500000 +0.43750000 +1.93750000 +0.43750000 
-0.25000000 -0.87500000 -1.87500000 +0.12500000 

 You can choose the value of the point p

 p:
+2.00000000 
+5.00000000 
+6.00000000 
+3.00000000 

 The projection of p on the hyperplan defined by v1, v2 and v3.

 Pp:            Copy this matrix into c00e.c
   -12.06250000, 
   -13.75000000, 
   +15.37500000, 
   -15.75000000  

 Press return to continue.