bpmdsp/filter_step_response.c

Go to the documentation of this file.
00001 
00006 #include "bpm/bpm_dsp.h"
00007 
00008 int filter_step_response( filter_t *f, double *wf, int itrig ) {
00009 
00015   int i = 0;
00016 
00017   if ( ! wf || ! f ) {
00018     bpm_error( "Invalid pointers in filter_step_reponse(...)", __FILE__, __LINE__ );
00019     return 1;
00020   } 
00021 
00022   // fill the step
00023   for ( i = 0; i < f->ns; i++ ) wf[i] = i < itrig ? 0. : 1.;
00024 
00025   // apply the filter to the step function
00026   if ( apply_filter( f, wf ) ) {
00027     bpm_error( "Unable to apply filter in filter_step_response(...)",
00028                __FILE__, __LINE__ );
00029     return 1;
00030   }
00031 
00032   return 0;
00033 }

Generated on Fri Nov 9 21:17:10 2007 for libbpm by  doxygen 1.5.1