Mathc initiation/Fichiers c : c27cd
Installer et compiler ces fichiers dans votre répertoire de travail.
c02f.c |
---|
/* --------------------------------- */
/* save as c02f.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "ff.h"
/* --------------------------------- */
int main(void)
{
double h = .0001;
pt3d p = i_pt3d(2,-3,1);
v3d u = grad_fxyz(f,h,p);
clrscrn();
printf(" Let f be a function of three variables.\n\n");
printf(" The Gradiant of f is the vector function given by :\n\n\n");
printf(" grad f(x,y,z) = f_x(x,y,z)i+f_y(x,y,z)j+f_z(x,y,z)k\n\n\n\n\n\n");
printf(" If f : x,y,z-> %s\n\n",feq);
printf(" Find the gradient of f at the point p(%+.1f,%+.1f,%+.1f)\n\n\n",
p.x,p.y,p.z);
printf(" grad f(x,y,z)]p = %+.3fi %+.3fj %+.3fk \n\n\n",u.i,u.j,u.k);
stop();
return 0;
}/* --------------------------------- */
grad f(x,y,z)]p = Le gradient au point p. Remarque : les calculs se font pendant l'initialisation des variables.
Exemple de sortie écran :
Let f be a function of three variables.
The Gradiant of f is the vector function given by :
grad f(x,y,z) = f_x(x,y,z)i+f_y(x,y,z)j+f_z(x,y,z)k
If f : x,y,z-> y*z**3 - 2*x**2
Find the gradient of f at the point p(+2.0,-3.0,+1.0)
grad f(x,y,z)]p = -8.000i +1.000j -9.000k
Press return to continue.