Mathc initiation/a606
Installer et compiler ces fichiers dans votre répertoire de travail.
c1bn.c |
---|
/* ---------------------------------- */
/* save as c1bn.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 bn = 2./T * fourier_bn(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"
" b_n = 2/T int( (%s) sin(n omega t) dt = %.6f\n"
" (a \n\n\n\n", feq, bn);
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
b_n = 2/T int( ((x*(x+1))) sin(n omega t) dt = 0.636620
(a
Press return to continue.