Add here a paragraph of the function description
/* intsymi_c subroutine * Symbol discrete integrator * IRCOM GROUP - Author : A.Layec * * Copyright (C) 2007 Alan Layec * * This file is part of modnumlib. * * modnumlib is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * modnumlib is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with modnumlib; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ /* REVISION HISTORY : * $Log$ */ #include "modnum_lib.h" /* intsymi_c routine de calcul d'intégration symbole * * Entrées : * n : dimension 1 des matrices d'entrée/sortie (scalaire) * m : dimension 2 des matrices d'entrée/sortie (scalaire) * nech : nombre d'échantillons par symbole (scalaire) * init_c : valeur initiale du compteur (vecteur de taille m) * step : pas d'intégration (scalaire) * u : matrice à intégrer par colonne (matrice de taille n,m) * * Sorties : * y : matrice intégrée (de taille n,m) * * Entrée/Sortie : * z : échantillon mémoire (vecteur de taille m) * */ void intsymi_c(int *n,int *m,int *nech,int *init_c,double *step,int *u,double *y,double *z) { /*Déclaration des variables compteurs*/ int i,l; int count; int ind_y; /*pour tous les échantillons du vecteur d'entrée*/ for(l=0;l<(*m);l++) { /*récupère valeur initiale*/ count=init_c[l]; ind_y = (*n)*l; for(i=0;i<(*n);i++) { if(i==count) { /* remise à zéro */ count += *nech; y[ind_y+i]=0; } else if(i==0) { /* integration + z */ y[ind_y+i]=2/(*step)*(u[ind_y+i]+u[ind_y+i-1])+z[l]; } else if(i==(*n)-1) { /* integration + y-1, z mémorisé */ y[ind_y+i]=2/(*step)*(u[ind_y+i]+u[ind_y+i-1])+y[ind_y+i-1]; z[l]=y[ind_y+i]; } else { /* integration + y-1 */ y[ind_y+i]=2/(*step)*(u[ind_y+i]+u[ind_y+i-1])+y[ind_y+i-1]; } } } return; }