DSP.jl Resampled signal length doesn't match upsampling factor

Hey guys,

I ran into a problem, while trying out the resampling algorithm from the DSP package (v0.6.3).
First I just create a test array with random numbers between 1 and 2. My plan is then to resample up by factor of 10. Apart from being very happy with the speed of that especially with the @threads macro, my output vectors have the length of 99.999.995 instead of 100.000.000. Anybody have an idea why that is?


function Resample(sig)
    return res

@time Threads.@threads for i in (1:size(x)[2])

Thanks and best regards,

First, try with a shorter vector and smaller degree of upsamplimg. These huge numbers just make things more confusing.

I would also guess (not knowing anything about this function) that it doesn’t necessarily extrapolate. So upsampling a length 10 vector by 2 should give a length 19 vector.

Try different lengths and factors and see what makes sense. Plot and inspect visually, etc. Pay particular attention to what happens near the beginning and end.

This is a known issue and I agree it’s not ideal.


1 Like

Thanks for the answers, the output of the resampling seems good though except that its missing a couple values. Maybe it will get fixed sometimes…

I tried it before with much smaller Vectors, but same problem there.

Best, Merit