patchGNU Octave - Patches: patch #8801, add support for the histogram and...

 
 

patch #8801: add support for the histogram and histcounts functions

Submitted by:  None
Submitted on:  Fri 20 Nov 2015 05:47:40 PM UTC  
Votes:  1  
 
Category:  Core : new function Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 21 Apr 2018 08:39:01 PM UTC, comment #4:

Attached is an updated patch.
I've fixed it cf. comment #2 and added the missing module.mk entries to include them in dist archives + removed them from__unimplemented__.m
NEWS entries are not added yet.

I've been including this patch for a looong time now, I think they can be incorporated straight away; maybe except histcounts.m as that may live in the OF statistics package?

(file #43985)

Philip Nienhuis <philipnienhuis>
Project Member
Sun 20 Nov 2016 08:26:57 PM UTC, comment #3:

In addition, I think "isreal" => "isnumeric" in L.203

Philip Nienhuis <philipnienhuis>
Project Member
Sun 20 Nov 2016 08:25:57 PM UTC, comment #2:

Q:
In histcounts I see this stanza in L.201-205:

Shouldn't the if statement check if "binwidth" rather than "binmethod" is real?

(looks like a copy-paste from he switch clause above)

Philip Nienhuis <philipnienhuis>
Project Member
Tue 09 Feb 2016 11:40:39 PM UTC, comment #1:

Lars, thanks for taking the time to write and contribute these functions to Octave!

This submission looks really good, I have not yet tried or tested the new functions, and haven't checked the Matlab description of these functions, but they look well done, including unit tests and proper coding style. Still needs further review and testing for functionality.

Please assign the copyright to yourself in the file header, it should read "Copyright (C) 2015 Lars Winterfeld" (and the "Author" line is not really needed once that change is made).

This patch should also add the new scripts to the module.mk files in the appropriate directories, and add a mention of these new functions to the top-level NEWS file for the future 4.2 release.

Mike Miller <mtmiller>
Project Administrator
Fri 20 Nov 2015 05:47:40 PM UTC, original submission:

more sophisticated version of histc and hist.
not yet implemented: category cell arrays as input.

Those are the two new histogram function in Matlab >= 2014 (or so). I used ideas from both the old hist and histc functions.

However, if the bins are uniform spaced (which is often the case, also if automatically determined), then the bin indexes are now calculated in O(N) instead of O(N*M), where N is the number of data points and M the number of bins. If not uniform spaced, I use the lookup function, which finds the indexes in O(N*log(M)), because the bin edges are sorted.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #35507:  histogram+histcounts.hg-export.diff added by None (16KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eflower3 (Voted in favor of this item)
  • -email is unavailable- added by mtmiller (Posted a comment)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-21 philipnienhuis Attached File- => Added patch_8801_histogram+histcounts_v2.cset, #43985
        CategoryNone => Core : new function
        StatusNeed Info => Ready For Test
    2016-10-17 eflower3 Carbon-Copy- => Added eflower3
    2016-02-09 mtmiller StatusNone => Need Info
    2015-11-20 None Attached File- => Added histogram+histcounts.hg-export.diff, #35507

    Back to the top


    Powered by Savane 3.3