Mathc complexes/c103c
Installer et compiler ces fichiers dans votre répertoire de travail.
inv_z_a.c |
---|
/* ------------------------------------ */
/* Save as : inv_z_a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(void)
{
double a[R3*(C3*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(R3,C3));
double **Inv = i_mZ(R3,C3);
clrscrn();
printf(" A\n");
p_mZ(A, S4,P0, S4,P0, C6);
stop();
clrscrn();
printf(" invgj_mZ(A,invA);");
pE_mZ(invgj_mZ(A,Inv), S1,P4, S1,P4, C3);
printf(" inv_mZ(A,Inv); :");
pE_mZ(inv_mZ(A,Inv), S1,P4, S1,P4, C3);
stop();
clrscrn();
printf(" Copy/Past into the octave window.\n\n");
p_Octave_mZ(A,"A",P0, P0);
printf(" inv(A)\n");
pE_mZ(Inv, S1,P4, S1,P4, C3);
stop();
f_mZ(Inv);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
fun();
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
Press return to continue.
invgj_mZ(A,invA);
-1.2917e-01+8.1007e-02i +8.5597e-02-6.6602e-02i +8.5160e-02-3.3778e-04i
+1.8258e-01-8.6352e-02i -1.5122e-01+8.1911e-02i +9.3058e-02-3.8517e-02i
+3.7156e-03-6.3244e-02i +7.1142e-02-3.4463e-02i -8.4514e-02+1.6084e-02i
inv_mZ(A,Inv); :
-1.2917e-01+8.1007e-02i +8.5597e-02-6.6602e-02i +8.5160e-02-3.3778e-04i
+1.8258e-01-8.6352e-02i -1.5122e-01+8.1911e-02i +9.3058e-02-3.8517e-02i
+3.7156e-03-6.3244e-02i +7.1142e-02-3.4463e-02i -8.4514e-02+1.6084e-02i
Press return to continue.
Copy/Past into the octave window.
A=[
+1+2*i,+3+4*i,+5+6*i;
+5+4*i,+1+3*i,+6+8*i;
+7+2*i,+5+1*i,+1+1*i]
inv(A)
-1.2917e-01+8.1007e-02i +8.5597e-02-6.6602e-02i +8.5160e-02-3.3778e-04i
+1.8258e-01-8.6352e-02i -1.5122e-01+8.1911e-02i +9.3058e-02-3.8517e-02i
+3.7156e-03-6.3244e-02i +7.1142e-02-3.4463e-02i -8.4514e-02+1.6084e-02i
Press return to continue.