# HG changeset patch # User Rik # Date 1328485562 28800 # Node ID 34af9f9ff98bbef6def45cae6d0d5ab422acacaa # Parent ce2b59a6d0e5e2a12cad1bcb26d8ba6d92f654a5 Use Octave coding conventions (double-quote " in preference to single quote ') * center.m, corr.m, cov.m, iqr.m, kendall.m, spearman.m, std.m, var.m: Use Octave coding conventions (double-quote " in preference to single quote ') diff -r ce2b59a6d0e5 -r 34af9f9ff98b scripts/statistics/base/center.m --- a/scripts/statistics/base/center.m Sun Feb 05 15:32:24 2012 -0800 +++ b/scripts/statistics/base/center.m Sun Feb 05 15:46:02 2012 -0800 @@ -70,7 +70,7 @@ %!assert(center (int8 ([1,2,3])), [-1,0,1]) %!assert(center (logical ([1, 0, 0, 1])), [0.5, -0.5, -0.5, 0.5]) %!assert(center (ones (3,2,0,2)), zeros (3,2,0,2)) -%!assert(center (ones (3,2,0,2, 'single')), zeros (3,2,0,2, 'single')) +%!assert(center (ones (3,2,0,2, "single")), zeros (3,2,0,2, "single")) %!assert(center (magic (3)), [3,-4,1;-2,0,2;-1,4,-3]) %!assert(center ([1 2 3; 6 5 4], 2), [-1 0 1; 1 0 -1]) diff -r ce2b59a6d0e5 -r 34af9f9ff98b scripts/statistics/base/corr.m --- a/scripts/statistics/base/corr.m Sun Feb 05 15:32:24 2012 -0800 +++ b/scripts/statistics/base/corr.m Sun Feb 05 15:46:02 2012 -0800 @@ -56,7 +56,7 @@ ## Special case, scalar is always 100% correlated with itself if (isscalar (x)) - if (isa (x, 'single')) + if (isa (x, "single")) retval = single (1); else retval = 1; diff -r ce2b59a6d0e5 -r 34af9f9ff98b scripts/statistics/base/cov.m --- a/scripts/statistics/base/cov.m Sun Feb 05 15:32:24 2012 -0800 +++ b/scripts/statistics/base/cov.m Sun Feb 05 15:46:02 2012 -0800 @@ -86,7 +86,7 @@ ## Special case, scalar has zero covariance if (isscalar (x)) - if (isa (x, 'single')) + if (isa (x, "single")) c = single (0); else c = 0; diff -r ce2b59a6d0e5 -r 34af9f9ff98b scripts/statistics/base/iqr.m --- a/scripts/statistics/base/iqr.m Sun Feb 05 15:32:24 2012 -0800 +++ b/scripts/statistics/base/iqr.m Sun Feb 05 15:46:02 2012 -0800 @@ -60,8 +60,8 @@ ## can take a matrix, rather than just a vector argument. n = sz(dim); sz(dim) = 1; - if (isa (x, 'single')) - y = zeros (sz, 'single'); + if (isa (x, "single")) + y = zeros (sz, "single"); else y = zeros (sz); endif diff -r ce2b59a6d0e5 -r 34af9f9ff98b scripts/statistics/base/kendall.m --- a/scripts/statistics/base/kendall.m Sun Feb 05 15:32:24 2012 -0800 +++ b/scripts/statistics/base/kendall.m Sun Feb 05 15:46:02 2012 -0800 @@ -99,10 +99,10 @@ endif endif - if (isa (x, 'single') || isa (y, 'single')) - cls = 'single'; + if (isa (x, "single") || isa (y, "single")) + cls = "single"; else - cls = 'double'; + cls = "double"; endif r = ranks (x); m = sign (kron (r, ones (n, 1, cls)) - kron (ones (n, 1, cls), r)); diff -r ce2b59a6d0e5 -r 34af9f9ff98b scripts/statistics/base/spearman.m --- a/scripts/statistics/base/spearman.m Sun Feb 05 15:32:24 2012 -0800 +++ b/scripts/statistics/base/spearman.m Sun Feb 05 15:46:02 2012 -0800 @@ -69,7 +69,7 @@ endif ## Restore class cleared by ranks - if (isa (x, 'single') || isa (y, 'single')) + if (isa (x, "single") || isa (y, "single")) rho = single (rho); endif diff -r ce2b59a6d0e5 -r 34af9f9ff98b scripts/statistics/base/std.m --- a/scripts/statistics/base/std.m Sun Feb 05 15:32:24 2012 -0800 +++ b/scripts/statistics/base/std.m Sun Feb 05 15:46:02 2012 -0800 @@ -92,8 +92,8 @@ n = sz(dim); if (n == 1 || isempty (x)) - if (isa (x, 'single')) - retval = zeros (sz, 'single'); + if (isa (x, "single")) + retval = zeros (sz, "single"); else retval = zeros (sz); endif diff -r ce2b59a6d0e5 -r 34af9f9ff98b scripts/statistics/base/var.m --- a/scripts/statistics/base/var.m Sun Feb 05 15:32:24 2012 -0800 +++ b/scripts/statistics/base/var.m Sun Feb 05 15:46:02 2012 -0800 @@ -92,8 +92,8 @@ n = sz(dim); if (n == 1) - if (isa (x, 'single')) - retval = zeros (sz, 'single'); + if (isa (x, "single")) + retval = zeros (sz, "single"); else retval = zeros (sz); endif