Mathc complexes/a40
Installer et compiler ces fichiers dans votre répertoire de travail.
c00c.c |
---|
/* ------------------------------------ */
/* Save as : c00c.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RA R3
#define CA C4
#define Cb C1
/* ------------------------------------ */
#define RAFree R4
#define CbFree C2
/* ------------------------------------ */
int main(void)
{
double ab[RA*((CA+Cb)*C2)] ={
1,2, 3,4, 5,6, 5,2, 1,2,
1,2, 3,4, 5,6, 1,3, 3,4,
1,2, 3,4, 1,1, 4,2, 5,6};
double **Ab = ca_A_mZ(ab,i_Abr_Ac_bc_mZ(RA,CA,Cb));
double **Ab_free = i_Abr_Ac_bc_mZ(RAFree,CA,CbFree);
double **b_free = i_mZ( RAFree, CbFree);
clrscrn();
printf(" Ab :");
p_mZ(Ab, S8,P2, S6,P2, C4);
printf(" b_free :");
p_mZ(GJ_PP_FreeV_mZ(Ab,Ab_free,b_free), S10,P4, S8,P4, C4);
stop();
f_mZ(Ab);
f_mZ(Ab_free);
f_mZ(b_free);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Dans cet exemple, on a introduit les nouvelles matrices avec les tailles calculées dans l'exemple précédent.
A b Fv Le nouveau système Ab_free devra avoir : (R4, C4+C1+C1)
double **Ab_free = i_Abr_Ac_bc_mZ(R4, C4, C2);
b Fv La matrice b_free devra avoir : (R4, C1+C1)
double **b_free = i_mZ(R4, C2);
Exemple de sortie écran :
------------------------------------
Ab :
+1.00 +2.00i +3.00 +4.00i +5.00 +6.00i +5.00 +2.00i
+1.00 +2.00i +3.00 +4.00i +5.00 +6.00i +1.00 +3.00i
+1.00 +2.00i +3.00 +4.00i +1.00 +1.00i +4.00 +2.00i
+1.00 +2.00i
+3.00 +4.00i
+5.00 +6.00i
b_free :
+5.1113 -0.5039i -2.2000 +0.4000i
+0.0000 +0.0000i +1.0000 +0.0000i
-0.7719 +0.1119i +0.0000 +0.0000i
-0.3529 -0.5882i -0.0000 -0.0000i
Press return to continue.