# HG changeset patch
# User carandraug
# Date 1331764140 0
# Node ID b4dccb6ed82d3b170acfb841e668e3b6bf37bac2
# Parent 67b198d309fd2177eb7850c9908e29df7973766b
normalise_distribution: workaround due to octave bug #34765 was made for releases 3.4.X only. However, regression in octave is not yet fixed as of 3.6.1. Expanding workaround for all releases after 3.4.0 until fixed in core.
diff -r 67b198d309fd -r b4dccb6ed82d main/statistics/NEWS
--- a/main/statistics/NEWS Wed Mar 14 22:17:16 2012 +0000
+++ b/main/statistics/NEWS Wed Mar 14 22:29:00 2012 +0000
@@ -7,6 +7,7 @@
** Bug fixes on the function:
+ normalise_distribution
repanova
** The following functions were removed since equivalents are now
diff -r 67b198d309fd -r b4dccb6ed82d main/statistics/inst/normalise_distribution.m
--- a/main/statistics/inst/normalise_distribution.m Wed Mar 14 22:17:16 2012 +0000
+++ b/main/statistics/inst/normalise_distribution.m Wed Mar 14 22:29:00 2012 +0000
@@ -1,23 +1,17 @@
-## Copyright (C) 2011 Alexander Klein
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING. If not, see
-## .
+## Copyright (C) 2011 Alexander Klein
+##
+## This program is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free Software
+## Foundation; either version 3 of the License, or (at your option) any later
+## version.
##
-## Author: Alexander Klein
-## Created: 2011-09-13
+## This program is distributed in the hope that it will be useful, but WITHOUT
+## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+## details.
##
-## TODO:
+## You should have received a copy of the GNU General Public License along with
+## this program; if not, see .
## -*- texinfo -*-
## @deftypefn{Function File} {@var{NORMALISED} =} normalise_distribution (@var{DATA})
@@ -198,7 +192,11 @@
## differently depending on octave version. This applies the fix for all
## 3.4 releases but it probably only appeared on 3.4.3 (can someone check?)
## See https://savannah.gnu.org/bugs/index.php?34765
- if (compare_versions (OCTAVE_VERSION, "3.4", "<") || compare_versions (OCTAVE_VERSION, "3.6", ">"))
+ ## Turns out that the bug was not completely fixed the first time and is
+ ## still present in 3.6.1
+ ## FIXME Once package dependency increases beyond an octave version that
+ ## has this fixed, remove this
+ if (compare_versions (OCTAVE_VERSION, "3.4", "<"))
## this is how it should work
f_remap = @( k ) ( normal ( k ) );
normalised ( :, k ) = arrayfun ( f_remap, target_indices );