Mercurial > hg > octave-terminal
changeset 14336:34af9f9ff98b
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 ')
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 05 Feb 2012 15:46:02 -0800 |
parents | ce2b59a6d0e5 |
children | a8a2d5def558 |
files | scripts/statistics/base/center.m scripts/statistics/base/corr.m scripts/statistics/base/cov.m scripts/statistics/base/iqr.m scripts/statistics/base/kendall.m scripts/statistics/base/spearman.m scripts/statistics/base/std.m scripts/statistics/base/var.m |
diffstat | 8 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/statistics/base/center.m +++ b/scripts/statistics/base/center.m @@ -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])
--- a/scripts/statistics/base/corr.m +++ b/scripts/statistics/base/corr.m @@ -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;
--- a/scripts/statistics/base/cov.m +++ b/scripts/statistics/base/cov.m @@ -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;
--- a/scripts/statistics/base/iqr.m +++ b/scripts/statistics/base/iqr.m @@ -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
--- a/scripts/statistics/base/kendall.m +++ b/scripts/statistics/base/kendall.m @@ -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));
--- a/scripts/statistics/base/spearman.m +++ b/scripts/statistics/base/spearman.m @@ -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