⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 FFTW, a collection of fast C routines to compute the Discrete Fourier Transform in one or more dime
💻
字号:
			   FFTW for MATLAB			 http://www.fftw.orgThis directory contains files that allow you to call FFTW from MATLAB(instead of MATLAB's own FFT functions).  This is accomplished bymeans of a "MEX" program--a MATLAB external function--that wrapsaround the FFTW library.NOTE: you must have MATLAB 5.0 or later to use these routines.Once you have compiled and installed the MEX (see below), using FFTWfrom within MATLAB is simple:The forward transform:	b = fftw(a,-1)The backwards transform:	c = fftw(b,+1)Note that FFTW computes the unnormalized DFT, so "c" in the above codeis a scaled version of the original "a".  (To get back the original"a", you would compute: c / prod(size(c)).)To get help on using FFTW in MATLAB, simply type "help fftw" at theMATLAB prompt.There are a few points that you should be aware of:* The first call is expensive:The first time you call FFTW from within MATLAB, it performsexpensive one-time computations.  (It is figuring out a "plan"--seethe FFTW manual for more information on what is happening.)  So, thefirst FFT you compute is slow (it probably takes several seconds).However, subsequent transforms of the same size will reuse the initialcomputations, and will be quite fast (often 2-3 times as fast asMATLAB's built-in FFT).  So, you should use FFTW within MATLAB whenyou are computing many FFTs of the same size and the initial cost isunimportant.  If you just need a single FFT, use MATLAB's built-inroutines.To reduce the startup cost, at some slight penalty in performance,replace FFTW_MEASURE in fftw.c with FFTW_ESTIMATE.* Small transforms are inefficient:There is a certain amount of overhead involved in calling FFTW fromMATLAB, and this makes small transforms relatively inefficient.  So,if you are doing very small transforms in MATLAB, you might be betteroff with the built-in routines.  (The exact point at which FFTW beginsto win will depend upon your machine.  It is simple for you to useMATLAB's timing routines to find out what is best in yourapplication.)(One of the major costs is in translating the array from MATLAB'srepresentation, in which real and imaginary parts are storedseparately, to FFTW's representation, in which complex numbers arestored as adjacent real/imaginary pairs.)* FFTW computes multi-dimensional transforms:The FFTW call in MATLAB computes a transform of the samedimensionality as the matrix that you give it.  Thus, it is analogousto the "fftn" routine in MATLAB, rather than the "fft" routine.* All transforms are out-of-place:Although the FFTW library is capable of performing in-placemulti-dimensional transforms, the MATLAB routine is out-of-place.This is simply a restriction of the environment--as far as we cantell, we are not allowed to modify the inputs that are passed to us,and must return our results in a separate array.**********************************************************************			     InstallationInstallation of the FFTW MEX routines is straightforward.  First, youhave to compile the FFTW library (see the FFTW manual).  Then, you mustcompile the file fftw.c in this directory using the MEX compilationprocedure on your machine.  Finally, you take the MEX file that isproduced, along with the fftw.m file in this directory, and installthem wherever you typically put your MATLAB scripts.The method for compiling MEX files should be described in your MATLABmanual.  (You will need to link with the FFTW library that you hadcompiled earlier.)  On UNIX systems, you can simply type "make", andthe Makefile in this directory should do the right thing.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -