Mathc initiation/Fichiers h : z d
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c0c1.c |
---|
/* --------------------------------- */
/* save as c0c1.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fc.h"
/* --------------------------------- */
int main(void)
{
double h = .001;
pt2d p = i_pt2d(-2.,1.);
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-> 2*x**2-3*x*y+8*y**2+2*x-4*y+4
Find the gradient of f at the point p(-2.0,+1.0)
grad f(x,y)]p = -9.000i +18.000j
Press return to continue.