changeset 12463:189baf055143

fftshift.m: Fix broken function documented in bug 32442
author Karsten Trulsen <karstent@math.uio.no>
date Sun, 20 Feb 2011 17:53:41 -0800
parents e4dbfe3019b1
children dfeea9cae79e
files scripts/ChangeLog scripts/signal/fftshift.m
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Sat Feb 19 18:21:58 2011 -0800
+++ b/scripts/ChangeLog	Sun Feb 20 17:53:41 2011 -0800
@@ -1,3 +1,7 @@
+2010-02-20  Karsten Trulsen  <karstent@math.uio.no>
+
+	* signal/fftshift.m: Fix broken function.  Bug 32442.
+
 2010-02-19  Rik  <octave@nomad.inbox5.com>
 
 	* io/dlmwrite.m, pkg/get_forge_pkg.m, plot/__gnuplot_ginput__.m,
--- a/scripts/signal/fftshift.m	Sat Feb 19 18:21:58 2011 -0800
+++ b/scripts/signal/fftshift.m	Sun Feb 20 17:53:41 2011 -0800
@@ -65,9 +65,9 @@
     retval = x(idx{:});
   else
     if (isvector (x))
-      x = length (x);
-      xx = ceil (x/2);
-      retval = x([xx+1:x, 1:xx]);
+      xl = length (x);
+      xx = ceil (xl/2);
+      retval = x([xx+1:xl, 1:xx]);
     elseif (ismatrix (x))
       nd = ndims (x);
       sz = size (x);