Mathc complexes/03z
Apparence
Installer et compiler ce fichier dans votre répertoire de travail.
zmul.c |
---|
/* ------------------------------------ */
/* Save as : zmul.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
nb_Z z = {2,3};
double **A = r_mZ( i_mZ(r,r),9.);
double **zA = zmul_mZ(z,A, i_mZ(r,r) );
clrscrn();
printf(" A");
p_mZ(A, S4,P0, S4,P0, C3);
printf(" With z = ");p_Z(z,S3,P0,S3,P0);printf(" \n\n");
printf(" zA");
p_mZ(zA, S4,P0, S4,P0, C3);
f_mZ(zA);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(RC3);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Ici on multiplie chaque coefficient par z.
Exemple de sortie écran :
A
-1 -5i +1 +6i +7 +6i
+6 -1i +5 +9i +8 +2i
+9 -6i -1 +3i +3 -8i
With z = +2 +3i
zA
+13 -13i -16 +15i -4 +33i
+15 +16i -17 +33i +10 +28i
+36 +15i -11 +3i +30 -7i
Press return to continue
Press X return to stop