Mathc initiation/Fichiers h : c47fc
Installer et compiler ces fichiers dans votre répertoire de travail.
c16b3.c |
---|
/* --------------------------------- */
/* save as c16c3.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fc.h"
/* --------------------------------- */
int main(void)
{
double a = 3;
double b = 1;
pt2d p = {a,b};
int n = 6;
clrscrn();
printf(" Use Newton's method to approximate,\n");
printf(" the solutions of the following system :\n\n\n");
printf(" | %s = 0 \n", feq);
printf(" | %s = 0\n\n\n", geq);
p = newton_fxy( n,
f,
g,
p);
printf(" the solutions of the following system is :\n\n\n");
printf(" x = %f y = %f \n\n\n",p.x,p.y);
G_2dp( -8,8,
-4,4,
feq,f,
geq,g,
p
);
printf(" ... load \"a_main.plt\" ... with gnuplot. \n\n");
stop();
return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Exemple de sortie écran :
Use Newton's method to approximate,
the solutions of the following system :
| (x**2)/9 + (y**2)/4 - 1 = 0
| ((x-1)**2)/2 + ((y-1)**2)/3 - 1 = 0
the solutions of the following system is :
x = 2.405188 y = 1.195375
Open the file "a_main.plt" with gnuplot.
Press return to continue.