且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Matlab中通过非整数移位来移动向量的元素

更新时间:2023-11-11 14:23:58

您可以使用傅立叶移位定理,与您一样,但是增加了滤波.我在此处问了类似的问题.结果看起来错误"的原因是因为您的输入向量不连续.您真正得到的结果是正确的"(或者至少是 true ).

You can do this with the fourier shift theorem as you do, but with added filtering. I asked a similar question here. The reason that the result looks 'wrong' is because your input vector is not continuous. The result you are getting really is 'correct' (or at least true).

您看到的问题称为 Gibbs振铃.您可以使用低通滤波器(***链接很好地解释了该解决方案),其阶跃响应中没有振铃.在有和没有高斯滤波器的情况下尝试代码.这种伪影经常出现在MRI成像(以及许多其他信号处理情况)中,有时可以通过过滤加以缓解.

The problem you are seeing is called Gibbs Ringing. You can make this less extreme by using a low pass filter (this wikipedia link explains the solution pretty well) that has no ringing in its step response. Try your code with and without a gaussian filter. This artefact is often seen in MRI imaging (and many other signal processing situations) and is sometimes alleviated by filtering.