Mercurial > octave-libtiff
changeset 22671:143b120ddb83 stable
fftshift: fix definition of frequency components in docstring (bug #49436)
* fftshift.m: Fix definition of df frequency spacing in docstring, factor out
of range expression for clarity. Fix small typo.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 26 Oct 2016 14:00:32 -0700 |
parents | bcfcbb5653e6 |
children | 4144fc49c318 |
files | scripts/signal/fftshift.m |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/signal/fftshift.m Wed Oct 26 10:19:22 2016 -0700 +++ b/scripts/signal/fftshift.m Wed Oct 26 14:00:32 2016 -0700 @@ -20,7 +20,7 @@ ## @deftypefn {} {} fftshift (@var{x}) ## @deftypefnx {} {} fftshift (@var{x}, @var{dim}) ## Perform a shift of the vector @var{x}, for use with the @code{fft} and -## @code{ifft} functions, in order the move the frequency 0 to the center of +## @code{ifft} functions, in order to move the frequency 0 to the center of ## the vector or matrix. ## ## If @var{x} is a vector of @math{N} elements corresponding to @math{N} time @@ -28,11 +28,11 @@ ## @code{fftshift (fft (@var{x}))} corresponds to frequencies ## ## @example -## f = [ -(ceil((N-1)/2):-1:1)*df 0 (1:floor((N-1)/2))*df ] +## f = [ -(ceil((N-1)/2):-1:1), 0, (1:floor((N-1)/2)) ] * df ## @end example ## ## @noindent -## where @nospell{@math{df} = 1 / @math{dt}}. +## where @nospell{@math{df = 1 / (N * dt)}}. ## ## If @var{x} is a matrix, the same holds for rows and columns. If @var{x} ## is an array, then the same holds along each dimension.