changeset 20266:83792dd9bcc1

Use in-place operators in m-files where possible. * scripts/audio/@audioplayer/set.m, scripts/audio/@audiorecorder/set.m, scripts/audio/mu2lin.m, scripts/elfun/cosd.m, scripts/general/del2.m, scripts/general/profexplore.m, scripts/general/quadl.m, scripts/general/rat.m, scripts/general/rotdim.m, scripts/help/get_first_help_sentence.m, scripts/help/private/__strip_html_tags__.m, scripts/image/cubehelix.m, scripts/io/textread.m, scripts/linear-algebra/duplication_matrix.m, scripts/linear-algebra/housh.m, scripts/linear-algebra/krylov.m, scripts/linear-algebra/logm.m, scripts/linear-algebra/normest.m, scripts/linear-algebra/onenormest.m, scripts/optimization/fminsearch.m, scripts/optimization/lsqnonneg.m, scripts/optimization/qp.m, scripts/plot/appearance/annotation.m, scripts/plot/appearance/axis.m, scripts/plot/appearance/legend.m, scripts/plot/appearance/specular.m, scripts/plot/draw/colorbar.m, scripts/plot/draw/hist.m, scripts/plot/draw/plotmatrix.m, scripts/plot/draw/private/__stem__.m, scripts/plot/util/__actual_axis_position__.m, scripts/plot/util/__gnuplot_drawnow__.m, scripts/plot/util/findobj.m, scripts/plot/util/print.m, scripts/plot/util/private/__go_draw_axes__.m, scripts/plot/util/private/__print_parse_opts__.m, scripts/plot/util/rotate.m, scripts/polynomial/pchip.m, scripts/polynomial/polyaffine.m, scripts/polynomial/polyder.m, scripts/polynomial/private/__splinefit__.m, scripts/polynomial/residue.m, scripts/signal/arch_fit.m, scripts/signal/arch_rnd.m, scripts/signal/bartlett.m, scripts/signal/blackman.m, scripts/signal/freqz.m, scripts/signal/hamming.m, scripts/signal/hanning.m, scripts/signal/spectral_adf.m, scripts/signal/spectral_xdf.m, scripts/signal/stft.m, scripts/sparse/bicgstab.m, scripts/sparse/cgs.m, scripts/sparse/private/__sprand_impl__.m, scripts/sparse/qmr.m, scripts/sparse/sprandsym.m, scripts/sparse/svds.m, scripts/specfun/legendre.m, scripts/special-matrix/gallery.m, scripts/statistics/base/gls.m, scripts/statistics/models/logistic_regression.m, scripts/statistics/tests/kruskal_wallis_test.m, scripts/statistics/tests/manova.m, scripts/statistics/tests/wilcoxon_test.m, scripts/time/datevec.m: Use in-place operators in m-files where possible.
author Rik <rik@octave.org>
date Tue, 26 May 2015 21:07:42 -0700
parents e914b5399c67
children a9574e3c6e9e
files scripts/audio/@audioplayer/set.m scripts/audio/@audiorecorder/set.m scripts/audio/mu2lin.m scripts/elfun/cosd.m scripts/general/del2.m scripts/general/profexplore.m scripts/general/quadl.m scripts/general/rat.m scripts/general/rotdim.m scripts/help/get_first_help_sentence.m scripts/help/private/__strip_html_tags__.m scripts/image/cubehelix.m scripts/io/textread.m scripts/linear-algebra/duplication_matrix.m scripts/linear-algebra/housh.m scripts/linear-algebra/krylov.m scripts/linear-algebra/logm.m scripts/linear-algebra/normest.m scripts/linear-algebra/onenormest.m scripts/optimization/fminsearch.m scripts/optimization/lsqnonneg.m scripts/optimization/qp.m scripts/plot/appearance/annotation.m scripts/plot/appearance/axis.m scripts/plot/appearance/legend.m scripts/plot/appearance/specular.m scripts/plot/draw/colorbar.m scripts/plot/draw/hist.m scripts/plot/draw/plotmatrix.m scripts/plot/draw/private/__stem__.m scripts/plot/util/__actual_axis_position__.m scripts/plot/util/__gnuplot_drawnow__.m scripts/plot/util/findobj.m scripts/plot/util/print.m scripts/plot/util/private/__go_draw_axes__.m scripts/plot/util/private/__print_parse_opts__.m scripts/plot/util/rotate.m scripts/polynomial/pchip.m scripts/polynomial/polyaffine.m scripts/polynomial/polyder.m scripts/polynomial/private/__splinefit__.m scripts/polynomial/residue.m scripts/signal/arch_fit.m scripts/signal/arch_rnd.m scripts/signal/bartlett.m scripts/signal/blackman.m scripts/signal/freqz.m scripts/signal/hamming.m scripts/signal/hanning.m scripts/signal/spectral_adf.m scripts/signal/spectral_xdf.m scripts/signal/stft.m scripts/sparse/bicgstab.m scripts/sparse/cgs.m scripts/sparse/private/__sprand_impl__.m scripts/sparse/qmr.m scripts/sparse/sprandsym.m scripts/sparse/svds.m scripts/specfun/legendre.m scripts/special-matrix/gallery.m scripts/statistics/base/gls.m scripts/statistics/models/logistic_regression.m scripts/statistics/tests/kruskal_wallis_test.m scripts/statistics/tests/manova.m scripts/statistics/tests/wilcoxon_test.m scripts/time/datevec.m
diffstat 66 files changed, 142 insertions(+), 143 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/audio/@audioplayer/set.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/audio/@audioplayer/set.m	Tue May 26 21:07:42 2015 -0700
@@ -50,7 +50,7 @@
       index = 1;
       for property = varargin{2}
         setproperty (player, char (property), varargin{3}{index});
-        index = index + 1;
+        index += 1;
       endfor
     else
       setproperty (player, varargin{2}, varargin{3});
--- a/scripts/audio/@audiorecorder/set.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/audio/@audiorecorder/set.m	Tue May 26 21:07:42 2015 -0700
@@ -50,7 +50,7 @@
       index = 1;
       for property = varargin{2}
         setproperty (recorder, char (property), varargin{3}{index});
-        index = index + 1;
+        index += 1;
       endfor
     else
       setproperty (recorder, varargin{2}, varargin{3});
--- a/scripts/audio/mu2lin.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/audio/mu2lin.m	Tue May 26 21:07:42 2015 -0700
@@ -69,7 +69,7 @@
   ## Convert to real or 8-bit.
   if (n == 0)
     ## [ -32768, 32767 ] -> [ -1, 1)
-    y = y/32768;
+    y /= 32768;
   elseif (n == 8)
     ld = max (abs (y (:)));
     if (ld < 16384 && ld > 0)
--- a/scripts/elfun/cosd.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/elfun/cosd.m	Tue May 26 21:07:42 2015 -0700
@@ -34,7 +34,7 @@
 
   I = x / 180;
   y = cos (I .* pi);
-  I = I + 0.5;
+  I += 0.5;
   y(I == fix (I) & isfinite (I)) = 0;
 
 endfunction
--- a/scripts/general/del2.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/general/del2.m	Tue May 26 21:07:42 2015 -0700
@@ -156,7 +156,7 @@
     endif
   endfor
 
-  D = D ./ nd;
+  D ./= nd;
 endfunction
 
 
--- a/scripts/general/profexplore.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/general/profexplore.m	Tue May 26 21:07:42 2015 -0700
@@ -105,7 +105,7 @@
         if (rv == 0)
           return;
         elseif (rv > 1)
-          rv = rv - 1;
+          rv -= 1;
           return;
         else
           assert (rv == 1);
--- a/scripts/general/quadl.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/general/quadl.m	Tue May 26 21:07:42 2015 -0700
@@ -133,7 +133,7 @@
     R = 1;
   endif
   if (R > 0 && R < 1)
-    tol = tol/R;
+    tol /= R;
   endif
   is = s * abs (is) * tol/myeps;
   if (is == 0)
--- a/scripts/general/rat.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/general/rat.m	Tue May 26 21:07:42 2015 -0700
@@ -102,7 +102,7 @@
 
   if (nargout == 2)
     ## Move the minus sign to the top.
-    n = n .* sign (d);
+    n .*= sign (d);
     d = abs (d);
 
     ## Return the same shape as you receive.
--- a/scripts/general/rotdim.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/general/rotdim.m	Tue May 26 21:07:42 2015 -0700
@@ -78,7 +78,7 @@
       plane = [];
       dim = 0;
       while (dim < nd)
-        dim = dim + 1;
+        dim += 1;
         if (sz (dim) != 1)
           plane = [plane, dim];
           if (length (plane) == 2)
@@ -104,7 +104,7 @@
 
   n = rem (n, 4);
   if (n < 0)
-    n = n + 4;
+    n += 4;
   endif
   if (n == 0)
     y = x;
--- a/scripts/help/get_first_help_sentence.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/help/get_first_help_sentence.m	Tue May 26 21:07:42 2015 -0700
@@ -117,9 +117,9 @@
     ## Remove the @end ... that corresponds to the @def we removed above
     def1 = def_idx(1);
     space_idx = find (help_text == " ");
-    space_idx = space_idx (find (space_idx > def1, 1));
+    space_idx = space_idx(find (space_idx > def1, 1));
     bracket_idx = find (help_text == "{" | help_text == "}");
-    bracket_idx = bracket_idx (find (bracket_idx > def1, 1));
+    bracket_idx = bracket_idx(find (bracket_idx > def1, 1));
     if (isempty (space_idx) && isempty (bracket_idx))
       error ("get_first_help_sentence: couldn't parse texinfo");
     endif
--- a/scripts/help/private/__strip_html_tags__.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/help/private/__strip_html_tags__.m	Tue May 26 21:07:42 2015 -0700
@@ -77,6 +77,6 @@
   endfor
 
   ## Actually remove the elements
-  text = text (keep);
+  text = text(keep);
 endfunction
 
--- a/scripts/image/cubehelix.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/image/cubehelix.m	Tue May 26 21:07:42 2015 -0700
@@ -62,7 +62,7 @@
 
     fract = ((0:n-1) / (n-1))';
     angle = 2 * pi * (start/3 + 1 + rots*fract);
-    fract = fract .^ gamma;
+    fract .^= gamma;
     amp   = hue * fract .* (1-fract) /2;
     map   = fract + amp .* ([cos(angle) sin(angle)] * coeff);
 
--- a/scripts/io/textread.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/io/textread.m	Tue May 26 21:07:42 2015 -0700
@@ -97,7 +97,6 @@
     if (varargin{headerlines + 1} > 0)
       fskipl (fid, varargin{headerlines + 1});
       varargin(headerlines:headerlines+1) = [];
-      nargin = nargin - 2;
     elseif (varargin{headerlines + 1} < 0)
       warning ("textread: negative headerline value ignored");
     endif
--- a/scripts/linear-algebra/duplication_matrix.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/linear-algebra/duplication_matrix.m	Tue May 26 21:07:42 2015 -0700
@@ -82,7 +82,7 @@
       d((j - 1) * n + i, count + i) = 1;
       d((i - 1) * n + j, count + i) = 1;
     endfor
-    count = count + n - j;
+    count += n - j;
   endfor
 
 endfunction
--- a/scripts/linear-algebra/housh.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/linear-algebra/housh.m	Tue May 26 21:07:42 2015 -0700
@@ -72,7 +72,7 @@
     housv = x;
     m = max (abs (housv));
     if (m != 0.0)
-      housv = housv / m;
+      housv /= m;
       alpha = norm (housv);
       if (alpha > z)
         beta = 1.0 / (alpha * (alpha + abs (housv(j))));
--- a/scripts/linear-algebra/krylov.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/linear-algebra/krylov.m	Tue May 26 21:07:42 2015 -0700
@@ -209,7 +209,7 @@
     for i = 1:nu
       hv = U(:,i);
       av = alpha(i);
-      V = V - av*hv*(hv'*V);
+      V -= av*hv*(hv'*V);
       H(i,nu-columns(V)+(1:columns(V))) = V(pivot_vec(i),:);
     endfor
 
--- a/scripts/linear-algebra/logm.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/linear-algebra/logm.m	Tue May 26 21:07:42 2015 -0700
@@ -86,7 +86,7 @@
   while (k < opt_iters)
     tau = norm (s - eye (size (s)),1);
     if (tau <= theta (7))
-      p = p + 1;
+      p += 1;
       j(1) = find (tau <= theta, 1);
       j(2) = find (tau / 2 <= theta, 1);
       if (j(1) - j(2) <= 1 || p == 2)
@@ -94,7 +94,7 @@
         break
       endif
     endif
-    k = k + 1;
+    k += 1;
     s = sqrtm (s);
   endwhile
 
@@ -102,7 +102,7 @@
     warning ("logm: maximum number of square roots exceeded; results may still be accurate");
   endif
 
-  s = s - eye (size (s));
+  s -= eye (size (s));
 
   if (m > 1)
     s = logm_pade_pf (s, m);
@@ -136,7 +136,7 @@
   [nodes, wts] = gauss_legendre (m);
   ## Convert from [-1,1] to [0,1].
   nodes = (nodes+1)/2;
-  wts = wts/2;
+  wts /= 2;
 
   n = length (A);
   s = zeros (n);
--- a/scripts/linear-algebra/normest.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/linear-algebra/normest.m	Tue May 26 21:07:42 2015 -0700
@@ -68,7 +68,7 @@
     if (normx == 0)
       x = rand (ncols, 1);
     else
-      x = x / normx;
+      x /= normx;
     endif
     y = A' * x;
     n = norm (y);
--- a/scripts/linear-algebra/onenormest.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/linear-algebra/onenormest.m	Tue May 26 21:07:42 2015 -0700
@@ -133,7 +133,7 @@
 
   ## Initial test vectors X.
   X = rand (n, t);
-  X = X ./ (ones (n,1) * sum (abs (X), 1));
+  X ./= ones (n,1) * sum (abs (X), 1);
 
   ## Track if a vertex has been visited.
   been_there = zeros (n, 1);
--- a/scripts/optimization/fminsearch.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/optimization/fminsearch.m	Tue May 26 21:07:42 2015 -0700
@@ -265,14 +265,14 @@
     vr = (1 + alpha)*vbar - alpha*V(:,n+1);
     x(:) = vr;
     fr = dirn * feval (fun,x,varargin{:});
-    nf = nf + 1;
+    nf += 1;
     vk = vr;  fk = fr; how = "reflect, ";
     if (fr > f(n))
       if (fr > f(1))
         ve = gamma*vr + (1-gamma)*vbar;
         x(:) = ve;
         fe = dirn * feval (fun,x,varargin{:});
-        nf = nf + 1;
+        nf += 1;
         if (fe > f(1))
           vk = ve;
           fk = fe;
@@ -289,7 +289,7 @@
       vc = beta*vt + (1-beta)*vbar;
       x(:) = vc;
       fc = dirn * feval (fun,x,varargin{:});
-      nf = nf + 1;
+      nf += 1;
       if (fc > f(n))
         vk = vc; fk = fc;
         how = "contract,";
@@ -299,11 +299,11 @@
           x(:) = V(:,j);
           f(j) = dirn * feval (fun,x,varargin{:});
         endfor
-        nf = nf + n-1;
+        nf += n-1;
         vk = (V(:,1) + V(:,n+1))/2;
         x(:) = vk;
         fk = dirn * feval (fun,x,varargin{:});
-        nf = nf + 1;
+        nf += 1;
         how = "shrink,  ";
       endif
     endif
--- a/scripts/optimization/lsqnonneg.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/optimization/lsqnonneg.m	Tue May 26 21:07:42 2015 -0700
@@ -144,7 +144,7 @@
         x += alpha*(xx - x);
         ## LH11: move from P to Z all X == 0.
         ## This corresponds to those indices where minimum of sf is attained.
-        idx = idx (sf == alpha);
+        idx = idx(sf == alpha);
         p(idx) = [];
         if (useqr)
           ## update the QR factorization.
--- a/scripts/optimization/qp.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/optimization/qp.m	Tue May 26 21:07:42 2015 -0700
@@ -237,13 +237,13 @@
             tmprow(i) = 1;
             A = [A;tmprow];
             b = [b; 0.5*(lb(i) + ub(i))];
-            n_eq = n_eq + 1;
+            n_eq += 1;
           else
             tmprow = zeros (1,n);
             tmprow(i) = 1;
             Ain = [Ain; tmprow; -tmprow];
             bin = [bin; lb(i); -ub(i)];
-            n_in = n_in + 2;
+            n_in += 2;
           endif
         endfor
       endif
@@ -281,12 +281,12 @@
               tmprow = A_in(i,:);
               A = [A;tmprow];
               b = [b; 0.5*(A_lb(i) + A_ub(i))];
-              n_eq = n_eq + 1;
+              n_eq += 1;
             else
               tmprow = A_in(i,:);
               Ain = [Ain; tmprow; -tmprow];
               bin = [bin; A_lb(i); -A_ub(i)];
-              n_in = n_in + 2;
+              n_in += 2;
             endif
           endfor
         endif
--- a/scripts/plot/appearance/annotation.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/appearance/annotation.m	Tue May 26 21:07:42 2015 -0700
@@ -1096,7 +1096,7 @@
   ## the vertical alignment of the arrow.
 
   ang = angle (complex (pos(3), pos(4)));
-  rot = rot / 180 * pi;
+  rot *= pi / 180;
 
   [~, pt] = min (abs ((-pi:pi/4:pi) - ang));
   pt -= floor (rot / (pi/4));
--- a/scripts/plot/appearance/axis.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/appearance/axis.m	Tue May 26 21:07:42 2015 -0700
@@ -375,13 +375,13 @@
   if (all (xlim == 0))
     xlim = eps () * [-1 1];
   elseif (diff (xlim == 0))
-    xlim = xlim .* (1 + eps () * [-1, 1]);
+    xlim .*= (1 + eps () * [-1, 1]);
   endif
   ylim = __get_tight_lims__ (ca, "y");
   if (all (ylim == 0))
     ylim = eps () * [-1 1];
   elseif (diff (ylim == 0))
-    ylim = ylim .* (1 + eps () * [-1, 1]);
+    ylim .*= (1 + eps () * [-1, 1]);
   endif
   set (ca, "xlim", xlim, "ylim", ylim)
   nd = __calc_dimensions__ (ca);
@@ -391,7 +391,7 @@
     if (all (zlim == 0))
       zlim = eps () * [-1 1];
     elseif (diff (zlim == 0))
-      zlim = zlim .* (1 + eps () * [-1, 1]);
+      zlim .*= (1 + eps () * [-1, 1]);
     endif
     set (ca, "zlim", zlim);
   endif
--- a/scripts/plot/appearance/legend.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/appearance/legend.m	Tue May 26 21:07:42 2015 -0700
@@ -715,7 +715,7 @@
           ## This implies that a change in fontsize should trigger a listener
           ## to update the legend.  The "2" was determined using a long legend
           ## key in the absence of any subplots.
-          gnuplot_offset = gnuplot_offset - 2 * fontsize;
+          gnuplot_offset -= 2 * fontsize;
         else
           gnuplot_offset = 0;
         endif
--- a/scripts/plot/appearance/specular.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/appearance/specular.m	Tue May 26 21:07:42 2015 -0700
@@ -88,7 +88,7 @@
 
   ## Allow postive values only
   retval(retval < 0) = 0;
-  retval = retval .^ se;
+  retval .^= se;
 
 endfunction
 
--- a/scripts/plot/draw/colorbar.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/draw/colorbar.m	Tue May 26 21:07:42 2015 -0700
@@ -398,48 +398,48 @@
   switch (cbox)
     case "northoutside"
       origin = pos(1:2) + [0., 0.9] .* sz + [1, -1] .* off;
-      sz = sz .* [1.0, 0.06];
+      sz .*= [1.0, 0.06];
       pos(4) = 0.8 * pos(4);
       mirr = true;
       vertical = false;
     case "north"
       origin = pos(1:2) + [0.05, 0.9] .* sz + [1, -1] .* off;
-      sz = sz .* [1.0, 0.06] * 0.9;
+      sz .*= [1.0, 0.06] * 0.9;
       mirr = false;
       vertical = false;
     case "southoutside"
       origin = pos(1:2) + off;
-      sz = sz .* [1.0, 0.06];
+      sz .*= [1.0, 0.06];
       pos(2) = pos(2) + pos(4) * 0.2;
       pos(4) = 0.8 * pos(4);
       mirr = false;
       vertical = false;
     case "south"
       origin = pos(1:2) + [0.05, 0.05] .* sz + off;
-      sz = sz .* [1.0, 0.06] * 0.9;
+      sz .*= [1.0, 0.06] * 0.9;
       mirr = true;
       vertical = false;
     case "eastoutside"
       origin = pos(1:2) + [0.9, 0] .* sz + [-1, 1] .* off;
-      sz = sz .* [0.06, 1.0];
+      sz .*= [0.06, 1.0];
       pos(3) = 0.8 * pos(3);
       mirr = true;
       vertical = true;
     case "east"
       origin = pos(1:2) + [0.9, 0.05] .* sz + [-1, 1] .* off;
-      sz = sz .* [0.06, 1.0] * 0.9;
+      sz .*= [0.06, 1.0] * 0.9;
       mirr = false;
       vertical = true;
     case "westoutside"
       origin = pos(1:2) + off;
-      sz = sz .* [0.06, 1.0];
+      sz .*= [0.06, 1.0];
       pos(1) = pos(1) + pos(3) * 0.2;
       pos(3) = 0.8 * pos(3);
       mirr = false;
       vertical = true;
     case "west"
       origin = pos(1:2) + [0.05, 0.05] .* sz + off;
-      sz = sz .* [0.06, 1.0] .* 0.9;
+      sz .*= [0.06, 1.0] .* 0.9;
       mirr = true;
       vertical = true;
   endswitch
--- a/scripts/plot/draw/hist.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/draw/hist.m	Tue May 26 21:07:42 2015 -0700
@@ -101,7 +101,7 @@
   if (nargin == 1 || ischar (varargin{iarg}))
     n = 10;
     x = [0.5:n]'/n;
-    x = x * (max_val - min_val) + ones (size (x)) * min_val;
+    x = (max_val - min_val) * x + min_val * ones (size (x));
   else
     ## nargin is either 2 or 3
     x = varargin{iarg++};
@@ -111,7 +111,7 @@
         error ("hist: number of bins NBINS must be positive");
       endif
       x = [0.5:n]'/n;
-      x = x * (max_val - min_val) + ones (size (x)) * min_val;
+      x = (max_val - min_val) * x  + min_val * ones (size (x));
     elseif (isreal (x))
       if (isvector (x))
         x = x(:);
--- a/scripts/plot/draw/plotmatrix.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/draw/plotmatrix.m	Tue May 26 21:07:42 2015 -0700
@@ -138,7 +138,7 @@
         have_line_spec = true;
         linespec = varargin(i);
         varargin(i) = [];
-        nargin = nargin - 1;
+        nargin -= 1;
         break;
       else
         print_usage ("plotmatrix");
--- a/scripts/plot/draw/private/__stem__.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/draw/private/__stem__.m	Tue May 26 21:07:42 2015 -0700
@@ -192,7 +192,7 @@
   else
     caller = "stem";
   endif
-  nargin = nargin - 1;  # account for have_z argument
+  nargin = nargin () - 1;  # account for have_z argument
 
   num_numeric = find (cellfun ("isclass", varargin, "char"), 1) - 1;
   if (isempty (num_numeric))
--- a/scripts/plot/util/__actual_axis_position__.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/util/__actual_axis_position__.m	Tue May 26 21:07:42 2015 -0700
@@ -67,13 +67,13 @@
     endif
     orig_aspect_ratio_2d = pos_in_pixels(3:4);
     rel_aspect_ratio_2d = aspect_ratio_2d ./ orig_aspect_ratio_2d;
-    rel_aspect_ratio_2d = rel_aspect_ratio_2d ./ max (rel_aspect_ratio_2d);
+    rel_aspect_ratio_2d ./= max (rel_aspect_ratio_2d);
     if (rel_aspect_ratio_2d(1) < rel_aspect_ratio_2d(2));
       dx = (1.0 - rel_aspect_ratio_2d(1)) * pos_in_pixels(3);
-      pos_in_pixels = pos_in_pixels + dx*[0.5, 0.0, -1.0, 0.0];
+      pos_in_pixels += dx*[0.5, 0.0, -1.0, 0.0];
     elseif (rel_aspect_ratio_2d(1) > rel_aspect_ratio_2d(2))
       dy = (1.0 - rel_aspect_ratio_2d(2)) * pos_in_pixels(4);
-      pos_in_pixels = pos_in_pixels + dy*[0.0, 0.5, 0.0, -1.0];
+      pos_in_pixels += dy*[0.0, 0.5, 0.0, -1.0];
     endif
     pos = pos_in_pixels ./ fig_position([3, 4, 3, 4]);
   elseif (strcmp (get (axis_obj.parent, "__graphics_toolkit__"), "gnuplot")
--- a/scripts/plot/util/__gnuplot_drawnow__.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/util/__gnuplot_drawnow__.m	Tue May 26 21:07:42 2015 -0700
@@ -185,8 +185,8 @@
                || any (strcmp (term, {"canvas", "emf", "gif", "jpeg", ...
                                       "pbm", "png", "pngcairo", "svg"}))))
           ## Convert to inches
-          gnuplot_pos = gnuplot_pos / 72;
-          gnuplot_size = gnuplot_size / 72;
+          gnuplot_pos /= 72;
+          gnuplot_size /= 72;
         endif
         if (all (gnuplot_size > 0))
           terminals_with_size = {"canvas", "emf", "epslatex", "fig", ...
--- a/scripts/plot/util/findobj.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/util/findobj.m	Tue May 26 21:07:42 2015 -0700
@@ -99,7 +99,7 @@
       if (ischar (varargin{n1}))
         if (strcmpi (varargin{n1}, "flat"))
           depth = 0;
-          n1 = n1 + 1;
+          n1 += 1;
         endif
       else
         error ("findobj: properties and options must be strings");
@@ -133,32 +133,32 @@
     if (ischar (args{na}))
       if (strcmpi (args{na}, "-property"))
         if (na + 1 <= numel (args))
-          na = na + 1;
+          na += 1;
           property(np) = 1;
           pname{np} = args{na};
-          na = na + 1;
+          na += 1;
           pvalue{np} = [];
-          np = np + 1;
+          np += 1;
         else
           error ("findobj: inconsistent number of arguments");
         endif
       elseif (strcmpi (args{na}, "-regexp"))
         if (na + 2 <= numel (args))
           regularexpression(np) = 1;
-          na = na + 1;
+          na += 1;
           pname{np} = args{na};
-          na = na + 1;
+          na += 1;
           pvalue{np} = args{na};
-          na = na + 1;
-          np = np + 1;
+          na += 1;
+          np += 1;
         else
           error ("findobj: inconsistent number of arguments");
         endif
       elseif (strcmpi (args{na}, "-depth"))
         if (na + 1 <= numel (args))
-          na = na + 1;
+          na += 1;
           depth = args{na};
-          na = na + 1;
+          na += 1;
         else
           error ("findobj: inconsistent number of arguments");
         endif
@@ -166,14 +166,14 @@
         ## Parameter/value pairs.
         if (na + 1 <= numel (args))
           pname{np} = args{na};
-          na = na + 1;
+          na += 1;
           pvalue{np} = args{na};
-          na = na + 1;
+          na += 1;
           if (na <= numel (args))
             if (ischar (args{na}))
               if (any (strcmpi (args{na}, operatorprecedence)))
                 logicaloperator{np} = args{na}(2:end);
-                na = na+1;
+                na += 1;
               endif
             else
               error ("findobj: properties and options must be strings");
@@ -181,7 +181,7 @@
           else
             logicaloperator{np} = "and";
           endif
-          np = np + 1;
+          np += 1;
         else
           error ("findobj: inconsistent number of arguments");
         endif
@@ -189,7 +189,7 @@
         if (strcmpi (args{na}, "-not"))
           extranegation(np) = true;
         endif
-        na = na + 1;
+        na += 1;
       endif
     else
       error ("findobj: properties and options must be strings");
@@ -211,7 +211,7 @@
     endfor
     handles = children;
     h = [h; children];
-    idepth = idepth + 1;
+    idepth += 1;
   endwhile
 
   if (numpairs > 0)
@@ -267,7 +267,7 @@
                                  match(:,np+1));
             logicaloperator(np+1) = [];
             match(:,np+1) = [];
-            numpairs = numpairs - 1;
+            numpairs -= 1;
           endif
           if (numpairs < 2)
             break;
--- a/scripts/plot/util/print.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/util/print.m	Tue May 26 21:07:42 2015 -0700
@@ -412,7 +412,7 @@
         endif
         if (! isempty (opts.scalefontsize) && ! opts.scalefontsize != 1)
           ## This is done to work around the bbox being whole numbers.
-          fontsize = fontsize * opts.scalefontsize;
+          fontsize *= opts.scalefontsize;
         endif
         ## FIXME: legend child objects need to be acted on first.
         ##        or legend fontsize callback will destroy them.
--- a/scripts/plot/util/private/__go_draw_axes__.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/util/private/__go_draw_axes__.m	Tue May 26 21:07:42 2015 -0700
@@ -414,7 +414,7 @@
   ## preserved the original order.
   [jnk, k] = setdiff (kids, [axis_obj.xlabel; axis_obj.ylabel; ...
                              axis_obj.zlabel; axis_obj.title]);
-  kids = kids (sort (k));
+  kids = kids(sort (k));
 
   if (nd == 3)
     fputs (plot_stream, "set parametric;\n");
@@ -1631,7 +1631,7 @@
   fputs (plot_stream, "set style data lines;\n");
 
   cmap = [cmap; addedcmap];
-  cmap_sz = cmap_sz + rows (addedcmap);
+  cmap_sz += rows (addedcmap);
   if (mono == false && length (cmap) > 0)
     fprintf (plot_stream,
              "set palette positive color model RGB maxcolors %i;\n",
@@ -2449,7 +2449,7 @@
             si++;
           endif
         endwhile
-        l1 = l1 (min (length (l1), si));
+        l1 = l1(min (length (l1), si));
         if (s(i) + l1 + 1 == s(i+1))
           if (str(s(i + 1) + p + 1) == "{")
             s2 = strfind (str(s(i + 1) + p + 2:end),'{');
@@ -2466,7 +2466,7 @@
                 si++;
               endif
             endwhile
-            l2 = l2 (min (length (l2), si));
+            l2 = l2(min (length (l2), si));
             if (length_string (str(s(i)+p+2:s(i)+p+l1-1)) <=
                 length_string (str(s(i+1)+p+2:s(i+1)+p+l2-1)))
               ## Shortest already first!
@@ -2507,7 +2507,7 @@
   l = length (s) - length (strfind (s,'{')) - length (strfind (s,'}'));
   m = regexp (s, '/([\w-]+|[\w-]+=\d+)', 'matches');
   if (! isempty (m))
-    l = l - sum (cellfun ("length", m));
+    l -= sum (cellfun ("length", m));
   endif
 endfunction
 
--- a/scripts/plot/util/private/__print_parse_opts__.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/util/private/__print_parse_opts__.m	Tue May 26 21:07:42 2015 -0700
@@ -495,7 +495,7 @@
     endif
     n = 0;
     while (n < numel (gs_binaries) && isempty (ghostscript_binary))
-      n = n + 1;
+      n += 1;
       ghostscript_binary = file_in_path (getenv ("PATH"), gs_binaries{n});
     endwhile
     if (warn_on_no_ghostscript && isempty (ghostscript_binary))
@@ -529,7 +529,7 @@
     endif
     n = 0;
     while (n < numel (binaries) && isempty (data.(binary).bin))
-      n = n + 1;
+      n += 1;
       data.(binary).bin = file_in_path (getenv ("PATH"), binaries{n});
     endwhile
     if (isempty (data.(binary).bin) && data.(binary).warn_on_absence)
@@ -574,7 +574,7 @@
   endif
 
   if (strcmp (paperunits, "normalized"))
-    paperposition = paperposition .* papersize([1,2,1,2]);
+    paperposition .*= papersize([1,2,1,2]);
   else
     paperposition = convert2points (paperposition, paperunits);
   endif
@@ -611,9 +611,9 @@
 function value = convert2points (value, units)
   switch (units)
     case "inches"
-      value = value * 72;
+      value *= 72;
     case "centimeters"
-      value = value * 72 / 2.54;
+      value *= 72 / 2.54;
     case "normalized"
       error ("print:customnormalized",
              "print.m: papersize=='<custom>' and paperunits='normalized' may not be combined");
--- a/scripts/plot/util/rotate.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/plot/util/rotate.m	Tue May 26 21:07:42 2015 -0700
@@ -111,7 +111,7 @@
     origin = [a, b, c];
   endif
 
-  direction = direction / norm (direction);
+  direction /= norm (direction);
 
   u = direction(1);
   v = direction(2);
--- a/scripts/polynomial/pchip.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/polynomial/pchip.m	Tue May 26 21:07:42 2015 -0700
@@ -116,7 +116,7 @@
   del2 = (d2 - delta) / h;
   c3 = del1 + del2;
   c2 = -c3 - del1;
-  c3 = c3 / h;
+  c3 /= h;
   coeffs = cat (3, c3, c2, d1, f1);
 
   ret = mkpp (x, coeffs, szy(1:end-1));
--- a/scripts/polynomial/polyaffine.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/polynomial/polyaffine.m	Tue May 26 21:07:42 2015 -0700
@@ -56,7 +56,7 @@
 
    ## Scale.
    if (mu(2) != 1)
-     g = g ./ (mu(2) .^ (lf-1:-1:0));
+     g ./= mu(2) .^ (lf-1:-1:0);
    endif
 
    ## Translate.
--- a/scripts/polynomial/polyder.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/polynomial/polyder.m	Tue May 26 21:07:42 2015 -0700
@@ -69,8 +69,8 @@
         endif
 
         ## move all the gain into the numerator
-        q = q/d(1);
-        d = d/d(1);
+        q /= d(1);
+        d /= d(1);
       endif
     else
       lp = numel (p);
--- a/scripts/polynomial/private/__splinefit__.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/polynomial/private/__splinefit__.m	Tue May 26 21:07:42 2015 -0700
@@ -151,7 +151,7 @@
     % Solve constraints
     [Z,u0] = solvecon(B,constr);
     % Solve Min norm(u*A-y), subject to u*B = yc
-    y = y - u0*A;
+    y -= u0*A;
     A = Z*A;
     v = lsqsolve(A,y,beta);
     u = u0 + v*Z;
@@ -487,7 +487,7 @@
 end
 
 % Reduce number of pieces
-pieces = pieces - 2*deg;
+pieces -= 2*deg;
 
 % Sort coefficients by interval number
 ii = [n*(1:pieces); deg*ones(deg,pieces)];
@@ -517,7 +517,7 @@
 B0 = zeros(n,nx);
 for k = 1:size(cc,1)
     if any(cc(k,:))
-        B0 = B0 + repmat(cc(k,:),n,1).*ppval(base,xc);
+        B0 += repmat(cc(k,:),n,1).*ppval(base,xc);
     end
     % Differentiate base
     coefs = base.coefs(:,1:n-k);
--- a/scripts/polynomial/residue.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/polynomial/residue.m	Tue May 26 21:07:42 2015 -0700
@@ -170,8 +170,8 @@
   a = polyreduce (a);
   b = polyreduce (b);
 
-  b = b / a(1);
-  a = a / a(1);
+  b /= a(1);
+  a /= a(1);
 
   la = length (a);
   lb = length (b);
@@ -329,13 +329,13 @@
     endfor
     pn = deconv (pden, pm);
     pn = r(n) * pn;
-    pnum = pnum + prepad (pn, N+1, 0, 2);
+    pnum += prepad (pn, N+1, 0, 2);
   endfor
 
   ## Add the direct term.
 
   if (numel (k))
-    pnum = pnum + conv (pden, k);
+    pnum += conv (pden, k);
   endif
 
   ## Check for leading zeros and trim the polynomial coefficients.
--- a/scripts/signal/arch_fit.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/arch_fit.m	Tue May 26 21:07:42 2015 -0700
@@ -96,17 +96,17 @@
     tmp = esq ./ h.^2 - 1 ./ h;
     s   = 1 ./ h(1:T-p);
     for j = 1 : p;
-      s = s - a(j+1) * tmp(j+1:T-p+j);
+      s -= a(j+1) * tmp(j+1:T-p+j);
     endfor
     r = 1 ./ h(1:T-p);
     for j = 1:p;
-      r = r + 2 * h(j+1:T-p+j).^2 .* esq(1:T-p);
+      r += 2 * h(j+1:T-p+j).^2 .* esq(1:T-p);
     endfor
     r = sqrt (r);
     X_tilde = x(1:T-p, :) .* (r * ones (1,k));
     e_tilde = e(1:T-p) .*s ./ r;
     delta_b = inv (X_tilde' * X_tilde) * X_tilde' * e_tilde;
-    b   = b + gamma * delta_b;
+    b  += gamma * delta_b;
     e   = y - x * b;
     esq = e .^ 2;
     Z   = autoreg_matrix (esq, p);
@@ -114,7 +114,7 @@
     f   = esq ./ h - ones (T,1);
     Z_tilde = Z ./ (h * ones (1, p+1));
     delta_a = inv (Z_tilde' * Z_tilde) * Z_tilde' * f;
-    a = a + gamma * delta_a;
+    a += gamma * delta_a;
   endfor
 
 endfunction
--- a/scripts/signal/arch_rnd.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/arch_rnd.m	Tue May 26 21:07:42 2015 -0700
@@ -63,14 +63,14 @@
   a  = reshape (a, 1, la);
   if (la == 1)
     a  = [a, 0];
-    la = la + 1;
+    la += 1;
   endif
 
   lb = length (b);
   b  = reshape (b, 1, lb);
   if (lb == 1)
     b  = [b, 0];
-    lb = lb + 1;
+    lb += 1;
   endif
   m = max ([la, lb]);
 
--- a/scripts/signal/bartlett.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/bartlett.m	Tue May 26 21:07:42 2015 -0700
@@ -42,7 +42,7 @@
   if (m == 1)
     c = 1;
   else
-    m = m - 1;
+    m -= 1;
     n = fix (m / 2);
     c = [2*(0:n)/m, 2-2*(n+1:m)/m]';
   endif
--- a/scripts/signal/blackman.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/blackman.m	Tue May 26 21:07:42 2015 -0700
@@ -60,7 +60,7 @@
   if (m == 1)
     c = 1;
   else
-    m = m - 1;
+    m -= 1;
     k = (0 : m)' / N;
     c = 0.42 - 0.5 * cos (2 * pi * k) + 0.08 * cos (4 * pi * k);
   endif
--- a/scripts/signal/freqz.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/freqz.m	Tue May 26 21:07:42 2015 -0700
@@ -152,7 +152,7 @@
     k = max (length (b), length (a));
     if (k > n/2 && nargout == 0)
       ## Ensure a causal phase response.
-      n = n * 2 .^ ceil (log2 (2*k/n));
+      n *= 2 .^ ceil (log2 (2*k/n));
     endif
 
     if (whole_region)
@@ -178,8 +178,8 @@
     ha = zeros (n, 1);
 
     for i = 1:N:pad_sz
-      hb = hb + fft (postpad (b(i:i+N-1), N))(1:n);
-      ha = ha + fft (postpad (a(i:i+N-1), N))(1:n);
+      hb += fft (postpad (b(i:i+N-1), N))(1:n);
+      ha += fft (postpad (a(i:i+N-1), N))(1:n);
     endfor
 
   endif
--- a/scripts/signal/hamming.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/hamming.m	Tue May 26 21:07:42 2015 -0700
@@ -60,7 +60,7 @@
   if (m == 1)
     c = 1;
   else
-    m = m - 1;
+    m -= 1;
     c = 0.54 - 0.46 * cos (2 * pi * (0 : m)' / N);
   endif
 
--- a/scripts/signal/hanning.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/hanning.m	Tue May 26 21:07:42 2015 -0700
@@ -60,7 +60,7 @@
   if (m == 1)
     c = 1;
   else
-    m = m - 1;
+    m -= 1;
     c = 0.5 - 0.5 * cos (2 * pi * (0 : m)' / N);
   endif
 
--- a/scripts/signal/spectral_adf.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/spectral_adf.m	Tue May 26 21:07:42 2015 -0700
@@ -60,7 +60,7 @@
     w = feval (win, cr, b);
   endif
 
-  c = c .* w;
+  c .*= w;
 
   retval = 2 * real (fft (c)) - c(1);
   retval = [(zeros (cr, 1)), retval];
--- a/scripts/signal/spectral_xdf.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/spectral_xdf.m	Tue May 26 21:07:42 2015 -0700
@@ -60,7 +60,7 @@
     w = feval (win, xr, b);
   endif
 
-  x = x - sum (x) / xr;
+  x -= sum (x) / xr;
 
   retval = (abs (fft (x)) / xr).^2;
   retval = real (ifft (fft (retval) .* fft (w)));
--- a/scripts/signal/stft.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/signal/stft.m	Tue May 26 21:07:42 2015 -0700
@@ -101,7 +101,7 @@
   start = 1;
   for i = 0:num_win
     z(1:win_size, i+1) = x(start:start+win_size-1) .* win_coef;
-    start = start + inc;
+    start += inc;
   endfor
 
   y = fft (z);
--- a/scripts/sparse/bicgstab.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/sparse/bicgstab.m	Tue May 26 21:07:42 2015 -0700
@@ -163,7 +163,7 @@
 
       t = Ax (shat);
       omega = (s' * t) / (t' * t);
-      x = x + alpha * phat + omega * shat;
+      x += alpha * phat + omega * shat;
       res = s - omega * t;
       rho_2 = rho_1;
 
--- a/scripts/sparse/cgs.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/sparse/cgs.m	Tue May 26 21:07:42 2015 -0700
@@ -147,9 +147,9 @@
       ## Cache.
       q = Ax (p);
       alpha = ro / (p' * q);
-      x = x + alpha * p;
+      x += alpha * p;
 
-      res = res - alpha * q;
+      res -= alpha * q;
       relres = norm (res) / norm_b;
       resvec = [resvec; relres];
 
--- a/scripts/sparse/private/__sprand_impl__.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/sparse/private/__sprand_impl__.m	Tue May 26 21:07:42 2015 -0700
@@ -135,7 +135,7 @@
           V = Vinit;
           V(i, i) = cv;  V(i, j) = sv;
           V(j, i) = -sv; V(j, j) = cv;
-          S = S * V;
+          S *= V;
         endif
       endwhile
     endif
--- a/scripts/sparse/qmr.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/sparse/qmr.m	Tue May 26 21:07:42 2015 -0700
@@ -181,9 +181,9 @@
     for iter=1:1:maxit
       ## If rho0 == 0 or xi1 == 0, method fails.
       v = vt / rho0;
-      y = y / rho0;
+      y /= rho0;
       w = wt / xi1;
-      z = z / xi1;
+      z /= xi1;
 
       delta1 = z' * y;   # If delta1 == 0, method fails.
 
--- a/scripts/sparse/sprandsym.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/sparse/sprandsym.m	Tue May 26 21:07:42 2015 -0700
@@ -41,7 +41,7 @@
     [i, j] = find (tril (n));
     [nr, nc] = size (n);
     S = sparse (i, j, randn (size (i)), nr, nc);
-    S = S + tril (S, -1)';
+    S += tril (S, -1)';
     return;
   endif
 
--- a/scripts/sparse/svds.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/sparse/svds.m	Tue May 26 21:07:42 2015 -0700
@@ -162,7 +162,7 @@
     b_opts.issym = true;
     b_sigma = sigma;
     if (! ischar (b_sigma))
-      b_sigma = b_sigma / max_a;
+      b_sigma /= max_a;
     endif
 
     if (b_sigma == 0)
@@ -225,7 +225,7 @@
       endif
     endif
 
-    s = s * max_a;
+    s *= max_a;
   endif
 
   if (nargout < 2)
--- a/scripts/specfun/legendre.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/specfun/legendre.m	Tue May 26 21:07:42 2015 -0700
@@ -192,7 +192,7 @@
       error ('legendre: NORMALIZATION option must be "unnorm", "norm", or "sch"');
   endswitch
 
-  scale = scale * ones (size (x));
+  scale *= ones (size (x));
 
   ## Based on the recurrence relation below
   ##            m                 m              m
--- a/scripts/special-matrix/gallery.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/special-matrix/gallery.m	Tue May 26 21:07:42 2015 -0700
@@ -595,7 +595,7 @@
       error ("gallery: unknown K '%d' for chebspec matrix.", k);
   endswitch
 
-  n = n-1;
+  n -= 1;
   C = zeros (n+1);
 
   one    = ones (n+1, 1);
@@ -773,7 +773,7 @@
     error ("gallery: K must be a numeric scalar for clement matrix.");
   endif
 
-  n = n-1;
+  n -= 1;
   x = n:-1:1;
   z = 1:n;
 
@@ -1493,13 +1493,13 @@
 
     if (k == 0)
       for i = 1:n-1
-        d = d * prod (1:i+1) * prod (1:n-i);
+        d *= prod (1:i+1) * prod (1:n-i);
       endfor
-      d = d * prod (1:n+1);
+      d *= prod (1:n+1);
 
     elseif (k == 1)
       for i = 0:n-1
-        d = d * prod (1:i) / prod (1:n+1+i);
+        d *= prod (1:i) / prod (1:n+1+i);
       endfor
       if (rem (n*(n-1)/2, 2))
         d = -d;
@@ -2218,7 +2218,7 @@
   ## If A will be a vector
   if (p == 1)
     A = randn (m, n);
-    A = A / norm (A);
+    A /= norm (A);
     return;
   endif
 
@@ -2339,7 +2339,7 @@
     error ("gallery: N must be an integer for riemann matrix.");
   endif
 
-  n = n+1;
+  n += 1;
   i = (2:n)' * ones (1, n-1);
   j = i';
   A = i .* (! rem (j, i)) - ones (n-1);
@@ -2435,7 +2435,7 @@
   E = 2*pi * ((1:n)' * ones (1, n) - ones (n, 1) * (1:n));
 
   for i = 1:m
-    T = T + w(i) * cos (theta(i)*E);
+    T += w(i) * cos (theta(i)*E);
   endfor
 endfunction
 
--- a/scripts/statistics/base/gls.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/statistics/base/gls.m	Tue May 26 21:07:42 2015 -0700
@@ -99,7 +99,7 @@
   endif
 
   ## Start of algorithm
-  o = o^(-1/2);
+  o ^= -1/2;
   z = kron (eye (cy), x);
   z = o * z;
   y1 = o * reshape (y, ry*cy, 1);
--- a/scripts/statistics/models/logistic_regression.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/statistics/models/logistic_regression.m	Tue May 26 21:07:42 2015 -0700
@@ -128,16 +128,16 @@
   ## maximize likelihood using Levenberg modified Newton's method
   iter = 0;
   while (abs (dl' * (d2l \ dl) / length (dl)) > tol)
-    iter = iter + 1;
+    iter += 1;
     tbold = tb;
     devold = dev;
     tb = tbold - d2l \ dl;
     [g, g1, p, dev] = logistic_regression_likelihood (y, x, tb, z, z1);
     if ((dev - devold) / (dl' * (tb - tbold)) < 0)
-      epsilon = epsilon / decr;
+      epsilon /= decr;
     else
       while ((dev - devold) / (dl' * (tb - tbold)) > 0)
-        epsilon = epsilon * incr;
+        epsilon *= incr;
          if (epsilon > 1e+15)
            error ("logistic_regression: epsilon too large");
          endif
--- a/scripts/statistics/tests/kruskal_wallis_test.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/statistics/tests/kruskal_wallis_test.m	Tue May 26 21:07:42 2015 -0700
@@ -73,7 +73,7 @@
   k = 0;
   j = 0;
   for i = 1 : m;
-    k = k + (sum (r ((j + 1) : (j + n(i))))) ^ 2 / n(i);
+    k += (sum (r ((j + 1) : (j + n(i))))) ^ 2 / n(i);
     j = j + n(i);
   endfor
 
@@ -82,7 +82,7 @@
 
   ## Adjust the result to takes ties into account.
   sum_ties = sum (polyval ([1, 0, -1, 0], runlength (sort (p))));
-  k = k / (1 - sum_ties / (n^3 - n));
+  k /= (1 - sum_ties / (n^3 - n));
 
   df = m - 1;
   pval = 1 - chi2cdf (k, df);
--- a/scripts/statistics/tests/manova.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/statistics/tests/manova.m	Tue May 26 21:07:42 2015 -0700
@@ -69,7 +69,7 @@
     group_label = s ([1, (reshape (i, 1, k - 1) + 1)]);
   endif
 
-  x = x - ones (n, 1) * mean (x);
+  x -= ones (n, 1) * mean (x);
   SST = x' * x;
 
   s = zeros (1, p);
@@ -77,7 +77,7 @@
   for i = 1 : k;
     v = x (find (g == group_label (i)), :);
     s = sum (v);
-    SSB = SSB + s' * s / rows (v);
+    SSB += s' * s / rows (v);
   endfor
   n_b = k - 1;
 
--- a/scripts/statistics/tests/wilcoxon_test.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/statistics/tests/wilcoxon_test.m	Tue May 26 21:07:42 2015 -0700
@@ -58,11 +58,11 @@
   x = reshape (x, 1, n);
   y = reshape (y, 1, n);
   d = x - y;
-  d = d (find (d != 0));
+  d = d(find (d != 0));
   n = length (d);
   if (n > 25)
     r = ranks (abs (d));
-    z = sum (r (find (d > 0)));
+    z = sum (r(find (d > 0)));
     z = ((z - n * (n + 1) / 4) / sqrt (n * (n + 1) * (2 * n + 1) / 24));
   else
     error ("wilcoxon_test: implementation requires more than 25 different pairs");
--- a/scripts/time/datevec.m	Mon May 25 22:02:15 2015 -0700
+++ b/scripts/time/datevec.m	Tue May 26 21:07:42 2015 -0700
@@ -183,9 +183,9 @@
     srnd = 2 .^ floor (- log2 (tmps));
     s = round (86400 * fracd .* srnd) ./ srnd;
     h = floor (s / 3600);
-    s = s - 3600 * h;
+    s -= 3600 * h;
     mi = floor (s / 60);
-    s = s - 60 * mi;
+    s -= 60 * mi;
 
   endif