Mathc initiation/Fichiers c : c27ca
Installer et compiler ces fichiers dans votre répertoire de travail.
c0a1.c |
---|
/* --------------------------------- */
/* save as c0a1.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fa.h"
/* --------------------------------- */
int main(void)
{
double h = .001;
pt2d p = i_pt2d(1,2);
v2d u = grad_fxy(f,h,p);
clrscrn();
printf(" Let f be a function of two variables.\n\n");
printf(" The Gradiant of f is the vector function given by :\n\n\n");
printf(" grad f(x,y) = f_x(x,y) i + f_y(x,y) j\n\n\n\n\n\n");
printf(" If f : x,y-> %s\n\n",feq);
printf(" Find the gradient of f at the point p(%+.1f,%+.1f)\n\n\n",p.x,p.y);
printf(" grad f(x,y)]p = %+.3fi %+.3fj \n\n\n",u.i,u.j);
stop();
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
grad f(x,y)]p = Le gradient au point p.
Exemple de sortie écran :
Let f be a function of two variables.
The Gradiant of f is the vector function given by :
grad f(x,y) = f_x(x,y) i + f_y(x,y) j
If f : x,y-> x**2 - 4*x*y
Find the gradient of f at the point p(+1.0,+2.0)
grad f(x,y)]p = -6.000i -4.000j
Press return to continue.