Mathc matrices/023
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 = rskewsymmetric_mR( i_mR(r,r), 9);
double **AT = transpose_mR(A, i_mR(r,r));
double **mns1A = smul_mR(-1,A, i_mR(r,r));
clrscrn();
printf(" Skew-symmetric matrix : -A = AT\n\n\n");
printf(" -A ");
p_mR(mns1A, S7,P3, C6);
printf(" AT");
p_mR(AT, S7,P3, C6);
f_mR(A);
f_mR(AT);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
-A = AT
Exemple de sortie écran :
Skew-symmetric matrix : -A = AT
-A
-0.000 +7.000 -8.000 -8.000
-7.000 -0.000 -9.000 +2.000
+8.000 +9.000 -0.000 -5.000
+8.000 -2.000 +5.000 -0.000
AT
+0.000 +7.000 -8.000 -8.000
-7.000 +0.000 -9.000 +2.000
+8.000 +9.000 +0.000 -5.000
+8.000 -2.000 +5.000 +0.000
Press return to continue
Press X return to stop