Code covered by the BSD License
-
bigscreen(arg)
BIGSCREEN Set graphics properties for large audiences.
-
bizcard
BIZCARD Future version of The MathWorks business card.
-
blackjack(N)
BLACKJACK. Use random numbers in Monte Carlo simulation.
-
bslashtx(A,b)
BSLASHTX Solve linear system (backslash)
-
censusgui(callbackarg)
CENSUSGUI Try to predict the US population in the year 2010.
-
circlegen(h)
CIRCLEGEN Generate approximate circles.
-
crypto97(x)
CRYPTO97 Cryptography example.
-
digraph(file)
DIGRAPH Generate and analyze text digraph frequency matrix.
-
eigsvdgui(A,job)
EIGSVDGUI Demonstrate computation of matrix eigenvalues and singular values.
-
encrypt(filein,fileout)
ENCRYPT Apply the CRYPTO function to a text file.
-
fern
FERN MATLAB implementation of the Fractal Fern
-
fftgui(y)
FFTGUI Demonstration of Finite Fourier Transform.
-
fftmatrix(varargin)
FFTMATRIX Plot columns of the Finite Fourier Transform matrix.
-
ffttx(x)
FFTTX Textbook Fast Finite Fourier Transform.
-
fibnum(n)
FIBNUM Fibonacci number.
-
fibonacci(n)
FIBONACCI Fibonacci sequence
-
finitefern(varargin)
FINITEFERN MATLAB implementation of the Fractal Fern.
-
flame
FLAME A stiff ordinary differential equation.
-
floatgui(callbackarg)
FLOATGUI Show structure of floating point numbers.
-
fmintx(F,a,b,tol,varargin)
FMINTX Textbook version of FMINBND
-
fzerogui(F,ab,varargin)
FZEROGUI Demonstrate the zero finding algorithm used by FZERO.
-
fzerotx(F,ab,varargin)
FZEROTX Textbook version of FZERO.
-
goldfract(n)
GOLDFRACT Golden ratio continued fraction.
-
golub(n)
GOLUB Badly conditioned integer test matrices.
-
greetings(phi)
GREETINGS Seasonal holiday fractal.
-
imagesvd(varargin)
IMAGESVD Principle component analysis of monochrome and color images.
-
inregion(x,y,xv,yv)
INREGION True for points inside or on a polygonal region.
-
interp2dgui(arg1,arg2)
INTERPGUI Behavior of periodic parametric curves.
-
interpgui(arg1,arg2)
INTERPGUI Behavior of interpolating functions.
-
lorenzgui
LORENZGUI Plot the orbit around the Lorenz chaotic attractor.
-
lugui(A,pivotstrat)
LUGUI Gaussian elimination demonstration.
-
lutx(A)
LUTX Triangular factorization, textbook version
-
membranetx(k,m,n,np)
MEMBRANETX Textbook version of MEMBRANE, eigenfunctions of L-membrane.
-
ncmgui
NCMGUI Master GUI for Numerical Computing with MATLAB.
-
ode23tx(F,tspan,y0,arg4,varar...
ODE23TX Solve non-stiff differential equations. Textbook version of ODE23.
-
pagerank(U,G,p)
PAGERANK Google's PageRank
-
pagerankpow(G)
PAGERANKPOW PageRank by power method with no matrix operations.
-
pchiptx(x,y,u)
PCHIPTX Textbook piecewise cubic Hermite interpolation.
-
pdegui(action)
PDEGUI Demonstrate solution of model partial differential equations.
-
pennymelt(delta)
PENNYMELT Heat a penny.
-
piecelin(x,y,u)
PIECELIN Piecewise linear interpolation.
-
pivotgolf(course,pivotstrat)
PIVOTGOLF Pivot Pickin' Golf.
-
polyinterp(x,y,u)
POLYINTERP Polynomial interpolation.
-
powersin(x)
-
primespiral(n,c)
PRIMESPIRAL Ulam's prime number spiral.
-
qrsteps(A,b)
QRSTEPS Orthogonal-triangular decomposition.
-
quadgui(F,a,b,tol,varargin)
QUADGUI Demonstrate numerical evaluation of a definite integral.
-
quadtx(F,a,b,tol,varargin)
QUADTX Evaluate definite integral numerically.
-
randgui(randfun)
RANDGUI Monte Carlo computation of pi.
-
randmcg(p,q)
RANDMCG Multiplicative congruential uniform random number generator.
-
randntx(varargin)
RANDNTX Text book version of RANDN
-
randssp(p,q)
RANDSSP Multiplicative congruential uniform random number generator.
-
randtx(arg1,arg2)
RANDTX Text book version of RAND
-
rungeinterp(arg)
RUNGEINTERP Runge's polynomial interpolation example.
-
splinetx(x,y,u)
SPLINETX Textbook spline function.
-
stegano(p,q)
STEGANO Investigate steganography in the default image.
-
surfer(root,n)
SURFER Create the adjacency graph of a portion of the Web.
-
swinger(x,y,orbitval)
SWINGER Classic double pendulum.
-
threenplus1(n)
-
touchtone(arg)
TOUCHTONE Use FFT to synthesize and analyze telephone dialing
-
tridisolve(a,b,c,d)
TRIDISOLVE Solve tridiagonal system of equations.
-
vandal(n)
VANDAL Symbolic Vandermonde matrix.
-
walker
WALKER Human gait.
-
waves
WAVES Wave equation in one and two space dimensions.
-
Contents.m
-
brownian.m
-
goldrect.m
-
randncond.m
-
sunspotstx.m
-
View all files
|
|
| ffttx(x)
|
function y = ffttx(x)
%FFTTX Textbook Fast Finite Fourier Transform.
% FFTTX(X) computes the same finite Fourier transform as FFT(X).
% The code uses a recursive divide and conquer algorithm for
% even order and matrix-vector multiplication for odd order.
% If length(X) is m*p where m is odd and p is a power of 2, the
% computational complexity of this approach is O(m^2)*O(p*log2(p)).
x = x(:);
n = length(x);
omega = exp(-2*pi*i/n);
if rem(n,2) == 0
% Recursive divide and conquer
k = (0:n/2-1)';
w = omega .^ k;
u = ffttx(x(1:2:n-1));
v = w.*ffttx(x(2:2:n));
y = [u+v; u-v];
else
% The Fourier matrix.
j = 0:n-1;
k = j';
F = omega .^ (k*j);
y = F*x;
end
|
|
Contact us