Mathc complexes/01r
Apparence
Installer et compiler ce fichier dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = rdefinite_positive_mZ( i_mZ(r,r), 99);
clrscrn();
printf(" Copy/Past into the octave windows \n\n");
p_Octave_mZ(A,"a",P9,P9);
printf(" [R] = chol (a,\"upper\") \n"
" R'*R\n"
" a\n\n");
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(R4);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Factorisation de Cholesky : [R] = chol (A, "upper") (octave) R' * R = A
Exemple de sortie écran :
Copy/Past into the octave windows
a=[
+47.669891671-0.000000000*i,+7.497444823-10.227739318*i,-1.746706982-12.294402228*i,+6.088059896-18.658660060*i;
+7.497444823+10.227739318*i,+40.156206103+0.000000000*i,+19.065552583+3.301799366*i,+8.196457467-15.214598996*i;
-1.746706982+12.294402228*i,+19.065552583-3.301799366*i,+73.140176655+0.000000000*i,-12.576359453-3.401136244*i;
+6.088059896+18.658660060*i,+8.196457467+15.214598996*i,-12.576359453+3.401136244*i,+67.033725571+0.000000000*i]
[R] = chol (a,"upper")
R'*R
a
Press return to continue
Press X return to stop