Mathc initiation/a604
Installer et compiler ces fichiers dans votre répertoire de travail.
c1a0.c |
---|
/* ---------------------------------- */
/* save as c1a0.c */
/* ---------------------------------- */
#include "x_hfile.h"
/* ---------------------------------- */
#include "f1.h"
/* ---------------------------------- */
int main(void)
{
double T = 2.;
double a = -1;
double b = +1;
double a0 = 1./T * fourier_a0(f, a, b);
clrscrn();
printf(" _+oo_ \n"
" \\ \n"
" S(t) = a0 + | an cos(omega* n*t) + bn sin(omega *n*t)\n"
" /_____ \n"
" n = 1 \n\n\n\n");
printf(" (a + T\n"
" a_0 = 1/T int( (%s) dx = %.6f\n"
" (a \n\n\n\n", feq, a0);
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Exemple de sortie écran :
_+oo_
\
S(t) = a0 + | an cos(omega* n*t) + bn sin(omega *n*t)
/_____
n = 1
(a + T
a_0 = 1/T int( ((x*(x+1))) dx = 0.333333
(a
Press return to continue.