Mathc matrices/02q
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);
clrscrn();
printf(" Copy/Past into the octave windows \n\n");
p_Octave_mR(A,"a",P9);
printf(" [L] = chol (a ,\"lower\") \n"
" L*L'\n"
" 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;
}
/* ------------------------------------ */
/* ------------------------------------ */
Factorisation de Cholesky : [L] = chol (A, "lower") (octave) L * L' = A
Exemple de sortie écran :
Copy/Past into the octave windows
a=[
+77.845396360,-13.945420822,+23.517844039;
-13.945420822,+73.270004402,+21.066741204;
+23.517844039,+21.066741204,+43.884599237]
[L] = chol (a ,"lower")
L*L'
a
Press return to continue
Press X return to stop