Mathc matrices/037
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);
clrscrn();
printf(" Copy/Past into the octave windows \n\n");
p_Octave_mR(A,"a",P9);
printf(" inva = cholinv (a)\n\n"
" a*inva\n\n"
" inva*a\n\n");
f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R4)+R1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Calcul l'inverse d'une matrice définie positive
Exemple de sortie écran :
Copy/Past into the octave windows
a=[
+28.414329691,-10.694623094,-6.011807562;
-10.694623094,+13.712809393,-13.322490259;
-6.011807562,-13.322490259,+44.872860915]
inva = cholinv (a)
a*inva
inva*a
Press return to continue
Press X return to stop