Mathc matrices/00e
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define FACTOR_E +1.E-0
/* ------------------------------------ */
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) );
double **Pinv = i_mR(r,r);
double **Ide = i_mR(r,r);
clrscrn();
printf(" A :");
p_mR(A,S3,P0,C7);
printf(" Pinv = V * invS_T * U_T ");
Pinv_Rn_mR(A,Pinv,FACTOR_E);
pE_mR(Pinv,S8,P3,C7);
printf(" Ide = Pinv * A ");
mul_mR(Pinv,A,Ide);
p_mR(Ide,S8,P2,C7);
f_mR(U);
f_mR(V);
f_mR(A);
f_mR(Pinv);
f_mR(Ide);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R4)+R1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Matrice de Hankel.
Exemple de sortie écran :
A :
-4 -8 -3 -7 -7
-8 -3 -7 -7 -1
-3 -7 -7 -1 +5
-7 -7 -1 +5 +8
-7 -1 +5 +8 -2
Pinv = V * invS_T * U_T
+1.708e-02 -9.428e-02 +7.516e-02 -5.047e-02 -2.661e-02
-9.428e-02 +8.299e-02 -1.912e-02 -5.469e-02 +2.191e-02
+7.516e-02 -1.912e-02 -2.622e-01 +2.001e-01 -1.088e-01
-5.047e-02 -5.469e-02 +2.001e-01 -1.397e-01 +1.453e-01
-2.661e-02 +2.191e-02 -1.088e-01 +1.453e-01 -1.085e-01
Ide = Pinv * A
+1.00 +0.00 +0.00 +0.00 +0.00
+0.00 +1.00 -0.00 +0.00 +0.00
-0.00 -0.00 +1.00 -0.00 +0.00
+0.00 +0.00 +0.00 +1.00 +0.00
+0.00 +0.00 +0.00 -0.00 +1.00
Press return to continue
Press X return to stop