Add here a paragraph of the function description.
/* cw_c subroutine * Noisy Constant Wave computation * IRCOM GROUP - Author : A.Layec */ /* REVISION HISTORY : * $Log$ */ #include "mod_num_lib.h" /* cw_c : routine de calcul d'une onde à fréquence constante (1 ou 2 composantes) * * Entrées : * n : longueur du vecteur * ampl : amplitude de l'onde * opt : option de la routine (1:cos, 2:sin, 3:cos et sin) * theta_i : pas d'incrémentation de l'angle * * Sorties : * y1 : adresse de départ du vecteur de sortie composante réelle * y2 : adresse de départ du vecteur de sortie composante imaginaire * * Entrées/Sorties : * theta : angle instantanée * * Dépendances : * math.h * */ void cw_c(int *n,double *ampl,int *opt,double *theta_i,double *y1,double *y2,double *theta) { /*déclaration*/ int i; for (i=0;i<(*n);i++) { switch (*opt) { case 1 : { y1[i]=(*ampl)*cos((*theta)); break; } case 2 : { y2[i]=(*ampl)*sin((*theta)); break; } case 3 : { y1[i]=(*ampl)*cos((*theta)); y2[i]=(*ampl)*sin((*theta)); break; } } *theta=(*theta)+(*theta_i); } return; }