Mathc initiation/Fichiers c : c27cb


Sommaire


Installer et compiler ces fichiers dans votre répertoire de travail.

c0b1.c
/* --------------------------------- */
/* save as c0b1.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fb.h"
/* --------------------------------- */
int main(void)
{
double h = .01;
pt2d   p = i_pt2d(-4,3);
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. 

Remarque : les calculs se font pendant l'initialisation des variables.

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-> sqrt(x**2 + y**2)

 Find the gradient of f at the point p(-4.0,+3.0)


 grad f(x,y)]p = -0.800i  +0.600j  


 Press return to continue.