matlab - 向量中的 fft 点和 fft 之间的差异

标签 matlab vector fft

给定一个长度为 L 的向量 Xfft(X)fft(X,L )

这是否意味着我们在使用 fft(X)fft 时在 L 点上取 fft > 执行 fft(X,L) 时矢量 L 的 >?

最佳答案

根据 the documentation on fft :

Y = fft(X) computes the discrete Fourier transform (DFT) of X using a fast Fourier transform (FFT) algorithm.

If X is a vector, then fft(X) returns the Fourier transform of the vector.

Y = fft(X,n) returns the n-point DFT. If no value is specified, Y is the same size as X.

If X is a vector and the length of X is less than n, then X is padded with trailing zeros to length n.

If X is a vector and the length of X is greater than n, then X is truncated to length n.

意思是如果你有一个向量 X长度L , fft(X)fft(X,L)等价的

有趣的一点是当您调用 fft(X,n) 时与 n~=L .

  • 如果n<L你的输入向量 X将被截断,即您将使用较少的测量值并获得缩短的傅里叶序列。
  • 如果n=L ;上面讨论过
  • 如果n>L你的矢量 X用零填充:X = [X zeros(L-n,1)] (对于行向量 X )。这将做的是在频域中进行插值。这最容易从公式中看出 at the bottom of the documentation :

enter image description here

如果我们增加 n ,我们得到一个更长的向量Y .但是,由于您填充了零,而不是信号的延续,因此其傅里叶变换将是频率之间的插值。通常你会得到 W(n) 给出的频率从你的采样频率运行,f_s一直到f_n = Nyquist/2L步骤,即尽可能多的数据点:linspace(F_s,f_n,L) .当零填充将 更多 点放入同一空间时,您在做什么:linspace(F_s,f_n,n) , 不添加信息。

关于matlab - 向量中的 fft 点和 fft 之间的差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57802554/

相关文章:

c++ - 从文本文件创建 vector vector

c++ - 鉴于下面的代码片段,我如何确认 v[0] 解析 VS2010 中的 <vector> 头文件的类型?

c++ - 模板参数无效(唯一指针)

matlab - 基本的 FFT 归一化问题

matlab - Matlab 矩阵中非连续预定义值的出现顺序

matlab - 在音频信号中获得零本地均值的任何好方法?

matlab - 是否可以使用 MATLAB 发出 http 请求?

.net - 将数据从 Matlab 应用程序服务器传输到 F#

android - 如果快速卷积需要 LPF,我如何使用基于 FFT 的快速卷积来实现 LPF?

concurrency - 并行编程入门