# HG changeset patch # User carandraug # Date 1331765046 0 # Node ID cee6027d95a80b5b0e87d2942b8f82e221749917 # Parent b4dccb6ed82d3b170acfb841e668e3b6bf37bac2 combnk: fixed bug due to changes (probably bug fix) in octave-core. Handle cell input correctly diff -r b4dccb6ed82d -r cee6027d95a8 main/statistics/NEWS --- a/main/statistics/NEWS Wed Mar 14 22:29:00 2012 +0000 +++ b/main/statistics/NEWS Wed Mar 14 22:44:06 2012 +0000 @@ -5,9 +5,9 @@ monotone_smooth kmeans jackknife - ** Bug fixes on the function: + ** Bug fixes on the functions: - normalise_distribution + normalise_distribution combnk repanova ** The following functions were removed since equivalents are now diff -r b4dccb6ed82d -r cee6027d95a8 main/statistics/inst/combnk.m --- a/main/statistics/inst/combnk.m Wed Mar 14 22:29:00 2012 +0000 +++ b/main/statistics/inst/combnk.m Wed Mar 14 22:44:06 2012 +0000 @@ -1,17 +1,17 @@ -## Copyright (C) 2010 Soren Hauberg +## Copyright (C) 2010 Soren Hauberg ## -## 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. +## 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. ## -## 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. +## 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 this program. If not, see . +## You should have received a copy of the GNU General Public License along with +## this program; if not, see . ## -*- texinfo -*- ## @deftypefn {Function File} {@var{c} =} combnk (@var{data}, @var{k}) @@ -51,7 +51,11 @@ else ## Process data n = numel (data); - retval = []; + if iscell (data) + retval = {}; + else + retval = []; + endif for j = 1:n C = __combnk__ (data ((j+1):end), k-1); C = cat (2, repmat (data (j), rows (C), 1), C);