Mathc initiation/a605
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c1an.c |
---|
/* ---------------------------------- */
/* save as c1an.c */
/* ---------------------------------- */
#include "x_hfile.h"
/* ---------------------------------- */
#include "f1.h"
/* ---------------------------------- */
int main(void)
{
double T = 2.;
double omega = (2.*PI/T);
double a = -1;
double b = +1;
double n = 1.;
double an = 2./T * fourier_an(f, a,b, omega, n);
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_n = 2/T int( (%s) cos(n omega t) dt = %.6f\n"
" (a \n\n\n\n", feq, an);
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_n = 2/T int( ((x*(x+1))) cos(n omega t) dt = -0.405285
(a
Press return to continue.