bugGNU Octave - Bugs: bug #34206, Bug in harmmean.m

 
 

bug #34206: Bug in harmmean.m

Submitted by:  None
Submitted on:  Sun 04 Sep 2011 05:03:00 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Octave ForgeAssigned to: None
Originator Name: Jacques MalapradeOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.4.2
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 20 Sep 2011 11:02:29 AM UTC, comment #2:

Hi Rik,

thank you for forwarding this to our mailing list and bring it to our attention (it was actually on the bug tracker but we haven't got around to start using it properly). Just for reference, this is now fixed on the development version. Thank you,

Carnë

Carnë Draug <carandraug>
Project Member
Mon 19 Sep 2011 03:37:28 AM UTC, comment #1:

This looks like a problem with an Octave Forge package, not a bug
in Octave. The correct place to report this problem is the
Octave Forge mailing list, octave-dev@lists.sourceforge.net.

A copy of this update to the bug report is being sent to that
list so that they are aware of it. Please follow up there.

Rik <rik5>
Project Administrator
Sun 04 Sep 2011 05:03:00 PM UTC, original submission:

I don't know if this is the right place to be submitting this but it seems to be in the source forge bugs page.
I have installed the statistics package from source forge version 1.0.10. I tried to use the geommean function and it came up with the following error:

>>> c = [1 1 3 6 9]

c =

1 1 3 6 9

>>> harmmean(c)

error: `s' undefined near line 28 column 14

>>>error: evaluating argument list element number 1

error: called from:
error: /home/malapradej/octave/statistics-1.0.10/harmmean.m at line 28, colum
n 7

I corrected this in my geommean.m file to the following:

## Copyright (C) 2001 Paul Kienzle
##
## 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 this program; If not, see <http://www.gnu.org/licenses/>.

## -- texinfo --
## @deftypefn {Function File} harmmean (@var{x})
## @deftypefnx{Function File} harmmean (@var{x}, @var{dim})
## Compute the harmonic mean.
##
## This function does the same as @code{mean (x, "h")}.
##
## @seealso{mean}
## @end deftypefn

function a = harmmean(x, dim)
if (nargin == 1)
a = mean(x, "h");
else
a = mean(x, "h", dim);
endif
endfunction

It was line 28 which was
a = mean(s, "h");

Hope this can be included in the next update.

Cheers,

Jacques

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by carandraug (Posted a comment)
  • -unavailable- added by rik5 (Not a core Octave issue, an Octave-Forge issue)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 20 Sep 2011 03:41:40 AM UTCrik5StatusNone=>Octave Forge
      Open/ClosedOpen=>Closed
    Tue 20 Sep 2011 03:40:41 AM UTCrik5Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1