From: <car...@us...> - 2012-03-14 22:44:12
|
Revision: 9888 http://octave.svn.sourceforge.net/octave/?rev=9888&view=rev Author: carandraug Date: 2012-03-14 22:44:06 +0000 (Wed, 14 Mar 2012) Log Message: ----------- combnk: fixed bug due to changes (probably bug fix) in octave-core. Handle cell input correctly Modified Paths: -------------- trunk/octave-forge/main/statistics/NEWS trunk/octave-forge/main/statistics/inst/combnk.m Modified: trunk/octave-forge/main/statistics/NEWS =================================================================== --- trunk/octave-forge/main/statistics/NEWS 2012-03-14 22:29:00 UTC (rev 9887) +++ trunk/octave-forge/main/statistics/NEWS 2012-03-14 22:44:06 UTC (rev 9888) @@ -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 Modified: trunk/octave-forge/main/statistics/inst/combnk.m =================================================================== --- trunk/octave-forge/main/statistics/inst/combnk.m 2012-03-14 22:29:00 UTC (rev 9887) +++ trunk/octave-forge/main/statistics/inst/combnk.m 2012-03-14 22:44:06 UTC (rev 9888) @@ -1,17 +1,17 @@ -## Copyright (C) 2010 Soren Hauberg +## Copyright (C) 2010 Soren Hauberg <so...@ha...> ## -## 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 <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- 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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |