Mathc initiation/Fichiers h : c14z d
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c0d1.c |
---|
/* --------------------------------- */
/* save as c0d1.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fd.h"
/* --------------------------------- */
int main(void)
{
double h = .001;
pt2d p = i_pt2d(2.2,-0.5);
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-> cos(x*y)
Find the gradient of f at the point p(+2.2,-0.5)
grad f(x,y)]p = -0.446i +1.961j
Press return to continue.