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?
x=rand(10000000,4).+1;
function Resample(sig)
res=DSP.resample(sig,10);
return res
end
@time Threads.@threads for i in (1:size(x)[2])
x_resampled=Resample(x[:,i])
end
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.