MATLAB: Do I receive incorrect answers or a crash if I pass an input of type single to the UPFIRDN function in the Signal Processing Toolbox 6.2.1 (R14SP1) and earlier

Signal Processing Toolbox

I am trying to use the UPFIRDN function with an input of type single as follows:
output = upfirdn(single(1:1e6),1,1,3)) ;
However, this seems to return incorrect results, or cause a segmentation violation if the input is large enough. Why is this occurring?

Best Answer

The UPFIRDN function is only designed to take double-precision inputs. The check to make sure that the inputs are of type double is missing in R14SP1 and earlier versions of the Signal Processing Toolbox. In R14SP2 and later versions of the toolbox, you will receive the following error message if you pass single inputs into the UPFIRDN function:
??? Error using ==> upfirdn
The input signal X must be a double-precision vector.