GammatoneFIlterBank produces different results inside/outside user function
This post may be difficult to answer because the data I’m using can’t be released to the public (yet)…
I’m running chirp sweep responses through Matlab’s built-in gammatonefilterbank structure. I have to process thousands of files in this way and so I pass the filter object and several waveform matrices to a function that I’ve written. As part of my function, I run the lines
signal_reference = sweeps_averaged(first_index:first_index+49999,3,i);
A = gammaFiltBank(signal_reference);
plot(A);
which, for the waveform in question, produces the graph below when I pause afterwards. Notice the large spikes at the beginning of the filtered outputs.
If I pause in the debugger and run those exact same lines again, I get the following graph of outputs below. Notice that the spikes are now gone.
Of the thousands of waveforms that I need to process, this error only occurs in roughly half a dozen of them. I can cut off the first 1000ish samples and get good results, but it’s forcing me to question the results overall – I’m not sure if the filter bank is producing other errors that I’m unaware of until I know the root cause.
Any thoughts on what might be causing this? Am I missing something simple? I’m using R2022A on a Windows 11 64-bit Dell desktop.This post may be difficult to answer because the data I’m using can’t be released to the public (yet)…
I’m running chirp sweep responses through Matlab’s built-in gammatonefilterbank structure. I have to process thousands of files in this way and so I pass the filter object and several waveform matrices to a function that I’ve written. As part of my function, I run the lines
signal_reference = sweeps_averaged(first_index:first_index+49999,3,i);
A = gammaFiltBank(signal_reference);
plot(A);
which, for the waveform in question, produces the graph below when I pause afterwards. Notice the large spikes at the beginning of the filtered outputs.
If I pause in the debugger and run those exact same lines again, I get the following graph of outputs below. Notice that the spikes are now gone.
Of the thousands of waveforms that I need to process, this error only occurs in roughly half a dozen of them. I can cut off the first 1000ish samples and get good results, but it’s forcing me to question the results overall – I’m not sure if the filter bank is producing other errors that I’m unaware of until I know the root cause.
Any thoughts on what might be causing this? Am I missing something simple? I’m using R2022A on a Windows 11 64-bit Dell desktop. This post may be difficult to answer because the data I’m using can’t be released to the public (yet)…
I’m running chirp sweep responses through Matlab’s built-in gammatonefilterbank structure. I have to process thousands of files in this way and so I pass the filter object and several waveform matrices to a function that I’ve written. As part of my function, I run the lines
signal_reference = sweeps_averaged(first_index:first_index+49999,3,i);
A = gammaFiltBank(signal_reference);
plot(A);
which, for the waveform in question, produces the graph below when I pause afterwards. Notice the large spikes at the beginning of the filtered outputs.
If I pause in the debugger and run those exact same lines again, I get the following graph of outputs below. Notice that the spikes are now gone.
Of the thousands of waveforms that I need to process, this error only occurs in roughly half a dozen of them. I can cut off the first 1000ish samples and get good results, but it’s forcing me to question the results overall – I’m not sure if the filter bank is producing other errors that I’m unaware of until I know the root cause.
Any thoughts on what might be causing this? Am I missing something simple? I’m using R2022A on a Windows 11 64-bit Dell desktop. gammatonefilterbank, filtering MATLAB Answers — New Questions