Mathc matrices/c23c
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00c.c |
---|
/* ------------------------------------ */
/* Save as : c00c.c */
/* ------------------------------------ */
#include "v_a.h"
#include "dot_trac.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mR(i_mR(r,r ),9.);
clrscrn();
printf(" A :");
p_mR(A,S3,P0,C6);
printf(" <A,A> = ||A||^2 \n\n");
printf(" (A.A)^(1/2) = %.4f \n", pow(dot_TR_R(A,A),(1./2.)));
printf(" ||A|| = %.4f \n\n", norm_TR_R(A));
f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Nous calculons la norme.
Exemple de sortie écran :
------------------------------------
A :
-3 +6 +6 -7 -1
+2 +4 -5 -9 +8
+6 -3 -9 -1 -5
-1 +6 -1 +6 +8
-1 -9 -9 +2 +2
<A,A> = ||A||^2
(A.A)^(1/2) = 27.964
||A|| = 27.964
Press return to continue
Press X to stop