Mathc initiation/004s
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c0b5.c |
|---|
/* --------------------------------- */
/* save as c0b5.c */
/* --------------------------------- */
#include "x_afile.h"
#include "fb.h"
/* --------------------------------- */
int main(void)
{
double Mass = simpson_dzdydx( R, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
double Mxy = simpson_dzdydx( zR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
double Mzx = simpson_dzdydx( yR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
double Mzy = simpson_dzdydx( xR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
clrscrn();
printf(" The function of density is :\n\n"
" R : x,y,z -> %.0f\n\n", R(0,0,0));
printf(" f : x,y,z -> %s\n\n", feq);
printf(" z1 : x,y -> %s \n", z1eq);
printf(" z0 : x,y -> %s\n\n", z0eq);
printf(" y1 : x -> %s \n", y1eq);
printf(" y0 : x -> %s\n\n", y0eq);
printf(" x1 : -> %s \n", x1eq);
printf(" x0 : -> %s\n\n", x0eq);
printf(" The center of mass is (X,Y,Z)\n\n");
printf(" X = Mzy/Mass = %.2f\n"
" Y = Mzx/Mass = %.2f\n"
" Z = Mxy/Mass = %.2f\n\n\n",
Mzy/Mass, Mzx/Mass, Mxy/Mass);
stop();
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Exemple de sortie écran :
The function of density is :
R : x,y,z -> 1
f : x,y,z -> 1
z1 : x,y -> (+cos(x)*sin(y) + 4)
z0 : x,y -> (+cos(x)*sin(y) - 4)
y1 : x -> +3
y0 : x -> -0
x1 : -> +3
x0 : -> -0
The center of mass is (X,Y,Z)
X = Mzy/Mass = 1.50
Y = Mzx/Mass = 1.50
Z = Mxy/Mass = 0.03
Press return to continue.
Exemple de sortie écran :
The function of density is :
R : x,y,z -> 100
f : x,y,z -> 1
z1 : x,y -> (+cos(x)*sin(y) + 4)
z0 : x,y -> (+cos(x)*sin(y) - 4)
y1 : x -> +3
y0 : x -> -0
x1 : -> +3
x0 : -> -0
The center of mass is (X,Y,Z)
X = Mzy/Mass = 1.50
Y = Mzx/Mass = 1.50
Z = Mxy/Mass = 0.03
Press return to continue.