Mathc complexes/08v
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
|---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA RC4
/* ------------------------------------ */
int main(void)
{
double V1[RCA*C1] ={
+4,
+3,
-1,
-2
};
double V2[RCA*C1] ={
-1,
-1,
+2,
-3
};
double V3[RCA*C1] ={
-2,
-5,
+4,
-3
};
double V4[RCA*C1] ={
-3,
-4,
+2,
-4
};
double **v1 = ca_A_mRZ(V1, i_mZ(RCA,C1));
double **Nv1 = smul_mZ(1./norm_Z(v1),v1, i_mZ(RCA,C1));
double **v2 = ca_A_mRZ(V2, i_mZ(RCA,C1));
double **Nv2 = smul_mZ(1./norm_Z(v2),v2, i_mZ(RCA,C1));
double **v3 = ca_A_mRZ(V3, i_mZ(RCA,C1));
double **Nv3 = smul_mZ(1./norm_Z(v3),v3, i_mZ(RCA,C1));
double **v4 = ca_A_mRZ(V4, i_mZ(RCA,C1));
double **Nv4 = smul_mZ(1./norm_Z(v4),v4, i_mZ(RCA,C1));
double **Nvn = i_mZ(RCA,RCA);
c_c_mZ(Nv1,C1,Nvn,C1);
c_c_mZ(Nv2,C1,Nvn,C2);
c_c_mZ(Nv3,C1,Nvn,C3);
c_c_mZ(Nv4,C1,Nvn,C4);
clrscrn();
printf(" You can choose the values of:\n\n"
" v1: The first vector of the hyperplan ");
p_mRZ(v1, S3,P0, C6);
printf(" Nv1 = (1/||v1||)v1");
p_mRZ(Nv1, S3,P12, C6);
stop();
clrscrn();
printf(" v2: The second vector of the hyperplan");
p_mRZ(v2, S3,P0, C6);
printf(" Nv2 = (1/||v2||)v2");
p_mRZ(Nv2, S3,P12, C6);
stop();
clrscrn();
printf(" v3: The third vector of the hyperplan");
p_mRZ(v3, S3,P0, C6);
printf(" Nv3 = (1/||v3||)v3");
p_mRZ(Nv3, S3,P12, C6);
stop();
clrscrn();
printf(" v4: The vector for the projection");
p_mRZ(v4, S3,P0, C6);
printf(" Nv4 = (1/||v4||)v4");
p_mRZ(Nv4, S3,P12, C6);
printf("\n");
printf(" Nvn is the matrix of the eigenvectors of the matrix A. \n\n"
" Copy this code into the files c00b.c and c00c.c\n\n"
" Nv1 Nv2 Nv3 Nv4");
P_mRZ(Nvn, S3,P12, C6);
stop();
f_mZ(v1);
f_mZ(Nv1);
f_mZ(v2);
f_mZ(Nv2);
f_mZ(v3);
f_mZ(Nv3);
f_mZ(v4);
f_mZ(Nv4);
f_mZ(Nvn);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Vous choisissez les vecteurs du plan (V1), (V2) et (V3) ainsi que le vecteur de projection (V4). Ensuite, vous normalisez ces vecteurs et vous les copiez dans la matrice (Nvn). Vous devez copier cette matrice, (Nvn), dans les fichiers c00b.c et c00c
Exemple de sortie écran :
You can choose the values of:
v1: The first vector of the hyperplan
+4
+3
-1
-2
Nv1 = (1/||v1||)v1
+0.730296743340
+0.547722557505
-0.182574185835
-0.365148371670
Press return to continue.
v2: The second vector of the hyperplan
-1
-1
+2
-3
Nv2 = (1/||v2||)v2
-0.258198889747
-0.258198889747
+0.516397779494
-0.774596669241
Press return to continue.
v3: The third vector of the hyperplan
-2
-5
+4
-3
Nv3 = (1/||v3||)v3
-0.272165526976
-0.680413817440
+0.544331053952
-0.408248290464
Press return to continue.
v4: The vector for the projection
-3
-4
+2
-4
Nv4 = (1/||v4||)v4
-0.447213595500
-0.596284794000
+0.298142397000
-0.596284794000
Nvn is the matrix of the eigenvectors of the matrix A.
Copy this code into the files c00b.c and c00c.c
Nv1 Nv2 Nv3 Nv4
+0.730296743340, -0.258198889747, -0.272165526976, -0.447213595500,
+0.547722557505, -0.258198889747, -0.680413817440, -0.596284794000,
-0.182574185835, +0.516397779494, +0.544331053952, +0.298142397000,
-0.365148371670, -0.774596669241, -0.408248290464, -0.596284794000
Press return to continue.