Mathc complexes/c082b
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
minorm_z.c |
---|
/* ------------------------------------ */
/* Save as : minorm_z.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mZ(i_mZ(r+C1,r+C1),9.);
double **Minor = i_mZ(r,r);
int minor_r = rp_I(r);
int minor_c = rp_I(r);
clrscrn();
printf(" A :");
p_mZ(A, S5,P0, S4,P0, C6);
printf(" Minor(R%d,C%d) :\n",minor_r, minor_c);
minor_c = minor_c*C2-C1;
/* col*C2 : a number has two columns */
/* -C1 : The real part of the number */
minor_mZ(A, Minor, minor_r, minor_c);
p_mZ(Minor, S5,P0, S4,P0, C6);
f_mZ(A);
f_mZ(Minor);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(RC5));
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
On construit une des matrices pour calculer les mineurs. Exemple de sortie écran :
A :
-5 -3i -1 +2i -3 +6i +6 +8i
+4 +2i +6 +8i +2 -1i -3 -7i
+6 -5i -1 +4i -1 +8i -7 -5i
+8 +8i +4 +2i -5 -5i -9 -9i
Minor(R2,C1) :
-1 +2i -3 +6i +6 +8i
-1 +4i -1 +8i -7 -5i
+4 +2i -5 -5i -9 -9i
Press return to continue
Press X to stop