home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / CUJJUN93.ZIP / 1106040B < prev    next >
Text File  |  1993-04-12  |  732b  |  27 lines

  1. void deconvolve_wave(const long int sequence_len,
  2.                      const double *convolving_func,
  3.                      const double *convolved, 
  4.                      double *h)
  5. {
  6.     auto double temp_wave_point_value,
  7.                 temp_wave1_recip 
  8.                 = 1.0 / convolving_func[1];
  9.     auto long int   k,
  10.                     i;
  11.     
  12.     for (k = 0; k < sequence_len; k++)
  13.     {
  14.         temp_wave_point_value = 0.0;
  15.         for (   i = 1; 
  16.                 i < k; 
  17.                 i++)
  18.         {
  19.             temp_wave_point_value += h[i]
  20.                 * (convolving_func[k + 1 - i]);
  21.         }
  22.         h[k] = temp_wave1_recip
  23.             * (convolved[k] - temp_wave_point_value);
  24.     }
  25.     return;
  26. }
  27.