How to invert a sample?
4 次查看(过去 30 天)
显示 更早的评论
I'm doing a project related to DSP. I have a doubt regarding sampling. My project is about inverting the samples of an audio signal. My doubt is how to invert samples by using MATLAB. For example if we take 16 samples the 0th sample should be 15th and the 15th sample should be 0th one. Can you please help me implement this in MATLAB.
5 个评论
采纳的回答
Sean de Wolski
2011-3-3
doc fliplr
doc flipud
5 个评论
Paulo Silva
2011-3-3
please read matlab's documentation and don't expect others to give you the complete code.
更多回答(2 个)
Paulo Silva
2011-3-3
Ok here's my worst code to do that for you
Sample=[3 4 5 7 9 8 4 3 5 6 7]
OutSample=[];
for lo=numel(Sample):-1:1
OutSample=[OutSample Sample(lo)];
pause(1) %the loop is too fast, lets slow it down
end
OutSample
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!