Mathc initiation/Fichiers h : c47fa
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c16a3.c |
---|
/* --------------------------------- */
/* save as c16a3.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fa.h"
/* --------------------------------- */
int main(void)
{
double a = -.5;
double b = -.5;
pt2d p = {a,b};
int n = 5;
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( -1.5,1.5,
-1.5,1.5,
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 + y**2 - 1 = 0
| y - sin(x) = 0
the solutions of the following system is :
x = -0.739085 y = -0.673612
Open the file "a_main.plt" with gnuplot.
Press return to continue.