Mathc matrices/00w
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **U = r_mR( i_mR(R1,r),9);
double **V = r_mR( i_mR(r,C1),9);
double **A = rToeplitz_mR(U,V,i_mR(r,r) );
double **Norm = normalize_mR(A, i_mR(r,r));
double **Norm_T = transpose_mR(Norm,i_mR(r,r));
clrscrn();
printf(" A :");
p_mR(A, S8,P4, C6);
stop();
clrscrn();
printf(" Norm :");
p_mR(Norm, S8,P4, C6);
printf(" Norm_T :");
p_mR(Norm_T, S8,P4, C6);
printf(" Norm_T * Norm :");
mul_mR(Norm_T,Norm, A);
p_mR(A, S10,P4, C6);
f_mR(U);
f_mR(V);
f_mR(A);
f_mR(Norm);
f_mR(Norm_T);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Matrice de Toeplitz. Normaliser une matrice non orthogonale.
Exemple de sortie écran :
A :
+1.0000 -6.0000 +3.0000 +5.0000
-3.0000 +1.0000 -6.0000 +3.0000
+6.0000 -3.0000 +1.0000 -6.0000
+5.0000 +6.0000 -3.0000 +1.0000
Press return to continue.
Norm :
+0.1187 -0.6626 +0.4045 +0.5934
-0.3560 +0.1104 -0.8090 +0.3560
+0.7121 -0.3313 +0.1348 -0.7121
+0.5934 +0.6626 -0.4045 +0.1187
Norm_T :
+0.1187 -0.3560 +0.7121 +0.5934
-0.6626 +0.1104 -0.3313 +0.6626
+0.4045 -0.8090 +0.1348 -0.4045
+0.5934 +0.3560 -0.7121 +0.1187
Norm_T * Norm :
+1.0000 +0.0393 +0.1920 -0.4930
+0.0393 +1.0000 -0.6701 -0.0393
+0.1920 -0.6701 +1.0000 -0.1920
-0.4930 -0.0393 -0.1920 +1.0000
Press return to continue
Press X return to stop