# HG changeset patch # User jwe # Date 1033166926 0 # Node ID b5267e631ba8c1181952e4e78f65671c5066f41d # Parent c651ee4c084624ee905032543d23ad67f6c7be9a [project @ 2002-09-27 22:48:46 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2002-09-27 Paul Kienzle + + * specfun/erfinv.m: Return NaN for NaN inputs. + 2002-09-26 Jeff Cunningham * statistics/base/var.m: Handle complex values. diff --git a/scripts/signal/fftshift.m b/scripts/signal/fftshift.m --- a/scripts/signal/fftshift.m +++ b/scripts/signal/fftshift.m @@ -23,12 +23,12 @@ ## and @code{ifft} functions, in order the move the frequency 0 to the ## center of the vector or matrix. ## -## If @var{v} is a vector of @math{E} elements corresponding to @math{E} +## If @var{v} is a vector of @math{N} elements corresponding to @math{N} ## time samples spaced of @math{Dt} each, then @code{fftshift (fft ## (@var{v}))} corresponds to frequencies ## ## @example -## f = linspace (-E/(4*Dt), (E/2-1)/(2*Dt), E) +## f = ((1:N) - ceil(N/2)) / N / Dt ## @end example ## ## If @var{v} is a matrix, the same holds for rows and columns. diff --git a/scripts/specfun/erfinv.m b/scripts/specfun/erfinv.m --- a/scripts/specfun/erfinv.m +++ b/scripts/specfun/erfinv.m @@ -42,7 +42,7 @@ x = reshape (x, m * n, 1); y = zeros (m * n, 1); - i = find ((x < -1) | (x > 1)); + i = find ((x < -1) | (x > 1) | isnan(x)); if any (i) y(i) = NaN * ones (length (i), 1); endif