Mathc matrices/02r
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 **A = rdefinite_positive_mR( i_mR(r,r), 99);
double **invA = inv_mR(A, i_mR(r,r));
double **EValue = eigs_mR(A, i_mR(r,C1));
clrscrn();
printf(" A = Q D QT: ");
p_mR(A,S12,P6,C6);
printf(" invA ");
p_mR(invA,S12,P6,C6);
printf(" EValue : eigs_mR();");
p_mR(EValue,S9,P3,C1);
f_mR(A);
f_mR(invA);
f_mR(EValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Ses valeurs propres sont positives. Elle est inversible.
Exemple de sortie écran :
A = Q D QT:
+50.710859 +2.491585 +5.086429 -6.594698
+2.491585 +48.454479 -0.252509 +3.235025
+5.086429 -0.252509 +44.321356 +12.935683
-6.594698 +3.235025 +12.935683 +40.513305
invA
+0.020777 -0.001401 -0.003763 +0.004695
-0.001401 +0.020861 +0.000918 -0.002187
-0.003763 +0.000918 +0.025584 -0.008855
+0.004695 -0.002187 -0.008855 +0.028449
EValue : eigs_mR();
+56.000
+54.000
+48.000
+26.000
Press return to continue
Press X return to stop