How to resample a data file using specific indices? And not using the resample function

2 次查看(过去 30 天)
The resampling index goes from [1:2:70000]. How do I incorporate this into data file (70000x1) to resample it?
Because of this problem I'm having difficulty creating a function to resample any general data that lets the user change the factor of steps in which the signal is resampled (in this case 2) with resampled signal and resampled Sr as output. Any leads on that also?
So far I have something messy... And it also includes the resample function which I need to change
% manufactures steps for resampling a clip
function [newclip, Sr] = generateresample (levels, Nsteps, Nsamples, originalsteps, originalSr, timeformeasurement)
levels = [1:Nsteps:Nsamples];
resampleclip = resample(data,1,Nsteps);
timeformeasurement = originalsteps/originalSr;
Sr = Nsteps/timeformeasurement;
end
end
But I think this needs too much input and I also don't know how to link it all together under the function

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by