Mathc matrices/00u
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 = rHankel_mR(U,V,i_mR(r,r) );
/* Orthogonalize : Normalize : YES; Normalize : NO; */
double **Orth = orth_mR(A, i_mR(r,r),YES);
double **Orth_T = transpose_mR(Orth,i_mR(r,r));
clrscrn();
printf(" A :");
p_mR(A, S8,P4, C6);
stop();
clrscrn();
printf(" Orth :");
p_mR(Orth, S8,P4, C6);
printf(" Orth_T :");
p_mR(Orth_T, S8,P4, C6);
printf(" Orth_T * Orth :");
mul_mR(Orth_T,Orth, A);
p_mR(A, S10,P4, C6);
f_mR(U);
f_mR(V);
f_mR(A);
f_mR(Orth);
f_mR(Orth_T);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Matrice de Hankel.
Exemple de sortie écran :
A :
+9.0000 +8.0000 +1.0000 +9.0000 +1.0000
+8.0000 +1.0000 +9.0000 +1.0000 -2.0000
+1.0000 +9.0000 +1.0000 -2.0000 +7.0000
+9.0000 +1.0000 -2.0000 +7.0000 +5.0000
+1.0000 -2.0000 +7.0000 +5.0000 -2.0000
Press return to continue.
Orth :
+0.5960 +0.4004 -0.0995 +0.4546 -0.5176
+0.5298 -0.2252 +0.5791 -0.5540 -0.1620
+0.0662 +0.8158 +0.2125 -0.1918 +0.4981
+0.5960 -0.2653 -0.5051 -0.0153 +0.5649
+0.0662 -0.2302 +0.5954 +0.6704 +0.3725
Orth_T :
+0.5960 +0.5298 +0.0662 +0.5960 +0.0662
+0.4004 -0.2252 +0.8158 -0.2653 -0.2302
-0.0995 +0.5791 +0.2125 -0.5051 +0.5954
+0.4546 -0.5540 -0.1918 -0.0153 +0.6704
-0.5176 -0.1620 +0.4981 +0.5649 +0.3725
Orth_T * Orth :
+1.0000 +0.0000 -0.0000 +0.0000 -0.0000
+0.0000 +1.0000 -0.0000 +0.0000 -0.0000
-0.0000 -0.0000 +1.0000 -0.0000 +0.0000
+0.0000 +0.0000 -0.0000 +1.0000 +0.0000
-0.0000 -0.0000 +0.0000 +0.0000 +1.0000
Press return to continue
Press X return to stop