Back to the main page.

Bug 3232 - Crash in ft_preproc_resample when original and desired sampling frequencies are the same

Reported 2017-01-13 11:50:00 +0100
Modified 2017-01-17 11:30:36 +0100
Product: FieldTrip
Component: preproc
Version: unspecified
Hardware: All
Operating System: All
Importance: P5 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Guillaume - 2017-01-13 11:50:28 +0100

ft_preproc_resample crashes if the original and desired sampling frequencies are identical: >> dat = ft_preproc_resample(rand(10),1000,1000,'downsample') Error in ft_preproc_resample (line 40) [nchans, nsamples] = size(dat); Output argument "datout" (and maybe others) not assigned during call to "ft_preproc_resample". A fix would be to copy dat into datout when Fold==Fnew, and maybe emitting a warning to let the user know.

Jan-Mathijs Schoffelen - 2017-01-13 13:41:58 +0100

OK, thanks for the notification. We will change it soon.

Jan-Mathijs Schoffelen - 2017-01-13 13:55:30 +0100

Fix implemented in pull request 295, which has just been pulled into the main repo. Thanks for reporting and suggested fix, Guillaume!

Jan-Mathijs Schoffelen - 2017-01-17 11:30:36 +0100

closed multiple bugs at once