Mathc initiation/a597
Installer et compiler ces fichiers dans votre répertoire de travail.
c0bn.c |
---|
/* ---------------------------------- */
/* save as c0bn.c */
/* ---------------------------------- */
#include "x_hfile.h"
/* ---------------------------------- */
#include "f0.h"
/* ---------------------------------- */
int main(void)
{
double T = PI;
double omega = (2.*PI/T);
double a = 0.;
double b = PI;
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%.0f = 2/T int( (%s) sin(n omega t) dt = %.6f\n"
" (a \n\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
b1 = 2/T int( (t) sin(n omega t) dt = -1.000000
(a
Press return to continue.