FFT method input argument have to be $2^n$ ?
It is a common misconception that all FFT algorithms require their inputs to have a length that is a power of 2. The radix-2 Cooley-Tukey algorithm, the first to be widely known, has this limitation, but there are mixed-radix versions of the algorithm that don't require a power-of-2-sized input. In addition to Cooley-Tukey, there are a number of other FFT algorithms that have differing requirements on their input size; there are even techniques like Rader's algorithm that work on inputs whose sizes are prime.

Good, general purpose FFT implementations like MATLAB's fft() or FFTW support a wide range of algorithms and select one that is most appropriate for the specific situation. For more details on the specifics, go to the MATLAB documentation itself:

&gt; doc fft



  Algorithms
  
  The FFT functions (fft, fft2, fftn, ifft, ifft2, ifftn) are based on a
  library called FFTW [3],[4]. To compute an N-point DFT when N is
  composite (that is, when N = N1N2), the FFTW library decomposes the
  problem using the Cooley-Tukey algorithm [1], which first computes N1
  transforms of size N2, and then computes N2 transforms of size N1. The
  decomposition is applied recursively to both the N1- and N2-point DFTs
  until the problem can be solved using one of several machine-generated
  fixed-size "codelets." The codelets in turn use several algorithms in
  combination, including a variation of Cooley-Tukey [5], a prime factor
  algorithm [6], and a split-radix algorithm [2]. The particular
  factorization of N is chosen heuristically.
  
  When N is a prime number, the FFTW library first decomposes an N-point
  problem into three (N – 1)-point problems using Rader's algorithm [7].
  It then uses the Cooley-Tukey decomposition described above to compute
  the (N – 1)-point DFTs.
  
  For most N, real-input DFTs require roughly half the computation time
  of complex-input DFTs. However, when N has large prime factors, there
  is little or no speed difference.
  
  The execution time for fft 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.
  
  
    Note   You might be able to increase the speed of fft using the
    utility function fftw, which controls the optimization of the
    algorithm used to compute an FFT of a particular size and dimension.
  
  
  References
  
  [1] Cooley, J. W. and J. W. Tukey, "An Algorithm for the Machine
  Computation of the Complex Fourier Series,"Mathematics of Computation,
  Vol. 19, April 1965, pp. 297-301. 
  
  [2] Duhamel, P. and M. Vetterli, "Fast Fourier Transforms: A Tutorial
  Review and a State of the Art," Signal Processing, Vol. 19, April
  1990, pp. 259-299. 
  
  [3] FFTW (http://www.fftw.org) 
  
  [4] Frigo, M. and S. G. Johnson, "FFTW: An Adaptive Software
  Architecture for the FFT,"Proceedings of the International Conference
  on Acoustics, Speech, and Signal Processing, Vol. 3, 1998, pp.
  1381-1384. 
  
  [5] Oppenheim, A. V. and R. W. Schafer, Discrete-Time Signal
  Processing, Prentice-Hall, 1989, p. 611. 
  
  [6] Oppenheim, A. V. and R. W. Schafer, Discrete-Time Signal
  Processing, Prentice-Hall, 1989, p. 619. 
  
  [7] Rader, C. M., "Discrete Fourier Transforms when the Number of Data
  Samples Is Prime," Proceedings of the IEEE, Vol. 56, June 1968, pp.
  1107-1108.