1D Fourier shift

版本 1.1.0.0 (1.9 KB) 作者: Tim
Shift 1D signals using the Fourier shift theorem.
1.4K 次下载
更新时间 2010/2/11

查看许可证

This code uses the Fourier shift theorem to cyclically shift 1D signals by an arbitrary amount. Both integer and non-integer shifts work.

It also supports padding the signal with zeros so that the shift appears non-cyclic (although it really isn't). If this is done then the shift amount is clamped so that the signal can't cycle round again.

It works with signals of any length and is completely vectorised.

Usage:

y = FourierShift(x, delta, zero_pad)

x = input vector (column or row)
y = output column vector
delta = shift amount in samples
zero_pad (optional) = if set to 'pad' then it simulates non-cyclic shifting

Example:

for ii = -50:0.4:50
plot(FourierShift(sinc(-2:0.1:2), ii, 'pad'))
pause(0.1);
end

引用格式

Tim (2024). 1D Fourier shift (https://www.mathworks.com/matlabcentral/fileexchange/23414-1d-fourier-shift), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2008a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Audio Processing Algorithm Design 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Small fix for even-length signals.

1.0.0.0