Listing 1 A function that convolves two arrays, f and g, and puts the result in array y

void convolve_wave(const long int sequence_len,
                const double *f,
                const double *g,
                double *y)
{
   auto unsigned long int x,
                      n;
   for (n = 0; n < sequence_len; n++)
   {
       y[n] = 0.0;
       for (x = 0; x < n; x++)
       {
          y[n] += f[x] * g[n - x];
       }
   }
   return;
}

/* End of File */