matlab fft中的相位函数

时间:2016-08-24 10:08:57

标签: matlab fft

我想知道为什么matlab fft中的阶段表现得像这样。这可能比matlab更具数学性。

我有一个持续相位的矩形。傅立叶变换显示中心矩形的倾斜相位。但是,如果偏移量为2,那么这个结果就会消失。

N = 16; w = 2;
data = zeros(1, N);    
data(N/2-w+0:N/2+w) = 1;

phase = ones(size(data))*1;
data = data.*exp(phase*sqrt(-1));

figure(3); clf;
plot(abs(data));

Ft = fft(fftshift(data));

Ftd = fftshift(Ft);
xaxis = 1:N;
figure(1);clf;hold on;
plot(xaxis,abs(Ftd), 'b-')
plot(xaxis,angle(Ftd), 'r-')
axis tight
hold off;

对于0(居中)的偏移,ftt(移位)看起来像:

enter image description here

偏移量为2

data(N/2-w+2:N/2+w) = 1;

enter image description here

0 个答案:

没有答案