2D FFT Plot

1 次查看(过去 30 天)
Poorva Limaye
Poorva Limaye 2017-2-5
I am plotting the 2D FFT plot of a matrix
clc;clear all;close all;
format long;
f1= 128;f2=512; fs=2^12;
time=0:1/fs:1-(1/fs);
D=8;
var=5e-8;
N=2^10;
disp(fs/N);
t=time(1:N);
sig=sin(2*pi*f1*t);%+sin(2*pi*f2*t);
x=sig+sqrt(var)*randn(size(t));
x1=reshape(x,length(x)/D,D);
xfft2=fftshift(fft2(winx));
y=abs(xfft2);
mesh(y);
The 2D FFT of this signal should be a sinc signal.Can anyone please explain why I am getting a triangular plot here?
  1 个评论
Akira Agata
Akira Agata 2017-2-17
In your sample code, a variable winx seems undefined. Is this a typo of x1 ?

请先登录,再进行评论。

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by