声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 3074|回复: 1

[经典算法] 请教关于MATLAB实现任意点IFFT的算法

[复制链接]
发表于 2007-8-3 11:08 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
MATLAB可以实现任意点的IFFT,且能保证输入输出是一样的长度,速度还很快,这是用的什么"高级"算法啊?他是怎么做的啊?我想用C语言做同样的事.
请知道的人指点下,谢谢!

本帖被以下淘专辑推荐:

回复
分享到:

使用道具 举报

发表于 2007-9-3 09:50 | 显示全部楼层
The algorithm for ifft(X) is the same as the algorithm
for fft(X), except for a sign change and a scale factor
of n = length(X). As for fft, the execution
time for ifft depends on the length of the transform.
It is fastest for powers of two. It is almost as fast for lengths that have
only small prime factors. It is typically several times slower for lengths
that are prime or which have large prime factors.


以上是matlab帮助中的一段话
下面是我看到一个ifft.m的代码,不知道是否是matlab自带的

  1. % IFFT.M
  2. % IFFT        IFFT(X) is the inverse discrete Fourier transform of
  3. %         vector X.   IFFT(X,N) is the N-point IFFT, where N must
  4. %         be a power of 2.  See also FFT, FFT2, IFFT2.
  5. %
  6. % ---------------------------------------------------------------
  7. %
  8. % COPYRIGHT : (c) NUHAG, Dept.Math., University of Vienna, AUSTRIA
  9. %             http://nuhag.eu/
  10. %             Permission is granted to modify and re-distribute this
  11. %             code in any manner as long as this notice is preserved.
  12. %             All standard disclaimers apply.
  13. %
  14. function y = ifft(x,nfft)
  15. %IFFT        IFFT(X) is the inverse discrete Fourier transform of
  16. %        vector X.   IFFT(X,N) is the N-point IFFT, where N must
  17. %        be a power of 2.  See also FFT, FFT2, IFFT2.

  18. %        J.N. Little 4-21-85
  19. %        Revised 6-11-88 JNL
  20. %        Copyright (c) 1985-88 by the MathWorks, Inc.

  21. if nargin == 2
  22.         y = conj(fft(conj(x),nfft));
  23. else
  24.         y = conj(fft(conj(x)));
  25. end
  26. [m,n] = size(y);
  27. if m == 1
  28.         m = n;
  29. end
  30. y = y/m;
复制代码
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-18 04:30 , Processed in 0.065129 second(s), 20 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表