MATLAB中的快速傅里叶逆变换

MATLAB中的快速傅里叶逆变换,matlab,fft,Matlab,Fft,下面的fft和ifft的MATLAB代码存在逆傅里叶信号y与输入信号x不匹配的问题。有什么解决办法吗 N = 1000; t0 = 1e-13; tau = 2*1e-14; n = [0:t0/40:2*1e-13-t0/40]; f0 = 3*1e8/(150*1e-9); x = cos(2*pi*f0*n); x = x.*exp((-(n-t0).^2)./(tau^2)); X = abs(fft(x,N)); F = [-N/2 : N/2 - 1]/N; X = fftshif

下面的
fft
ifft
的MATLAB代码存在逆傅里叶信号
y
与输入信号
x
不匹配的问题。有什么解决办法吗

N = 1000;
t0 = 1e-13;
tau = 2*1e-14;
n = [0:t0/40:2*1e-13-t0/40];
f0 = 3*1e8/(150*1e-9);

x = cos(2*pi*f0*n);
x = x.*exp((-(n-t0).^2)./(tau^2));
X = abs(fft(x,N));
F = [-N/2 : N/2 - 1]/N;
X = fftshift(X);
y=ifft(X,80);

figure(3)
plot(n,y)

我在这里看到了一些问题:

N = 1000;
t0 = 1e-13;
tau = 2*1e-14;
n = [0:t0/40:2*1e-13-t0/40];
f0 = 3*1e8/(150*1e-9);

x = cos(2*pi*f0*n);
x = x.*exp((-(n-t0).^2)./(tau^2));
%  X = abs(fft(x,N));  <-- Not seen this technique before, and why N=1000?
% try something more like:
X = fft(x);

F = [-N/2 : N/2 - 1]/N;
% this is fine to shift and plot the function
Xshifted = fftshift(X);
plot( abs( Xshifted ) )
% now you're taking the inverse of the shifted function, not what you want
% y=ifft(X,80);  also not sure about the 80
y = ifft(X);

figure(3)
plot(n,y)
figure(4)
plot( n, x ); hold on; plot( n, y, 'o' )
N=1000;
t0=1e-13;
tau=2*1e-14;
n=[0:t0/40:2*1e-13-t0/40];
f0=3*1e8/(150*1e-9);
x=cos(2*pi*f0*n);
x=x.*exp(((n-t0)。^2)。/(tau^2));

%X=abs(fft(X,N)) 我在这里看到了一些问题:

N = 1000;
t0 = 1e-13;
tau = 2*1e-14;
n = [0:t0/40:2*1e-13-t0/40];
f0 = 3*1e8/(150*1e-9);

x = cos(2*pi*f0*n);
x = x.*exp((-(n-t0).^2)./(tau^2));
%  X = abs(fft(x,N));  <-- Not seen this technique before, and why N=1000?
% try something more like:
X = fft(x);

F = [-N/2 : N/2 - 1]/N;
% this is fine to shift and plot the function
Xshifted = fftshift(X);
plot( abs( Xshifted ) )
% now you're taking the inverse of the shifted function, not what you want
% y=ifft(X,80);  also not sure about the 80
y = ifft(X);

figure(3)
plot(n,y)
figure(4)
plot( n, x ); hold on; plot( n, y, 'o' )
N=1000;
t0=1e-13;
tau=2*1e-14;
n=[0:t0/40:2*1e-13-t0/40];
f0=3*1e8/(150*1e-9);
x=cos(2*pi*f0*n);
x=x.*exp(((n-t0)。^2)。/(tau^2));

%X=abs(fft(X,N)) 如果取fft的绝对值,则会破坏重建原始信号所需的相位信息,即计算的时刻

X = abs(fft(x,N));
你不能通过ifft返回,因为现在你只有震级。 此外,只有在使用相同数量的FFT仓且NFFT>=长度(x)时,逆变换才有效


应与x完全相同。

如果取fft的绝对值,则会破坏重建原始信号所需的相位信息,即计算的时刻

X = abs(fft(x,N));
你不能通过ifft返回,因为现在你只有震级。 此外,只有在使用相同数量的FFT仓且NFFT>=长度(x)时,逆变换才有效


应该与x完全相同。

对于每个频率,我如何找到快速傅里叶变换的量,x,我在其中有提到的频率相关参数?就像,
x=fft(x,N);Y=fft(Y,N);Z=X*Y;z=real(ifft(z))
?我的问题是,在一些具有不同距离的离散频率中,存在与频率相关的参数。但我在这样的频率中找不到x的傅里叶变换。对于与信号处理相关的非编程问题,您可以在中找到更多信息,我如何找到快速傅里叶变换的数量,x,对于我在其中提到的频率相关参数的每个频率?就像,
x=fft(x,N);Y=fft(Y,N);Z=X*Y;z=real(ifft(z))
?我的问题是,在一些具有不同距离的离散频率中,存在与频率相关的参数。但是我找不到x在这种频率下的傅里叶变换。对于与信号处理相关的非编程问题,您可以在