Mercurial > hg > octave-nkf
diff scripts/signal/fftshift.m @ 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 | c792872f8942 |
children | b3c158b8941c |
line wrap: on
line diff
--- a/scripts/signal/fftshift.m +++ b/scripts/signal/fftshift.m @@ -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);