patchGNU Octave - Patches: patch #9199, [octave forge] (signal)...

 
 

patch #9199: [octave forge] (signal) statelevels: new function

Submitter:  None
Submitted:  Wed 28 Dec 2016 07:32:24 PM UTC
   
 
Category:  Forge : new function Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  lostbard Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 11 Jul 2023 04:13:26 PM UTC, comment #4: 

I added some tests, function docs and a few minor additions for matlab compatibility and pushed to the repo

John Donoghue <lostbard>
Group Member
Fri 30 Mar 2018 08:27:41 PM UTC, comment #3: 

Thanks for the work you have put into this function so far.

This function is needed, looks functionally correct and Matlab compatible to me.

It would be very helpful if you could add some unit tests to the end of the file. It would also be helpful to conform to the Octave coding style, variable naming conventions, and include a descriptive doc string.

Mike Miller <mtmiller>
Group Member
Fri 30 Dec 2016 10:01:42 PM UTC, comment #2: 

Attached is the m file (not a patch).

This new version is compatible with the matlab function.

Fixes:
*takes vectors of both dimensions
*variable arguments for
  *bin numbers
  *method
*returns histogram bin count and bin centers

This has been verified with clock_ex.mat and returns the same values as the MATLAB implementation of the function.

Many other functions can now be implemented as they are dependent on this eg dutycycle.

B/W,

Chris

(file #39332)

Chris <elca>
Fri 30 Dec 2016 02:29:34 AM UTC, comment #1: 

Currently returns strange values for perfect bi-level signals. Eg 0.005 instead of 0.

Not sure if this is correct behavior or not. Will compare with MATLAB and make appropriate changes.

I plan to write a thorough test for the function and make improvements to it shortly.

Please advise if you want to delete this patch and start again.

B/W,

Chris

Chris <elca>
Wed 28 Dec 2016 07:32:24 PM UTC, original submission:  

Added function statelevels.m to inst dir.

The function uses the histogram method described here IEEE® Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003, pp. 15–17.

I have not made any changes as I'm not sure how to add it to list of implemented functions.

The implementation is basic and doesn't currently support different algorithms or custom bin widths - this will come later.

However, it is certainly good enough to implement many other functions which are reliant on it such as dutycycle.

B/W,

Chris

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #39332:  statelevels.m added by elca (4KiB - text/x-objcsrc)
file #39326:  statelevels.patch added by None (3KiB - 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 lostbard (Posted a comment)
  • -email is unavailable- added by elca (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-11 lostbard StatusNeed Info Done
        Assigned tomtmiller lostbard
        Open/ClosedOpen Closed
    2019-03-07 mtmiller Carbon-CopyRemoved 80942 -
    2018-03-30 mtmiller StatusNone Need Info
    2018-03-30 mtmiller Assigned toNone mtmiller
        SummaryAdded statelevels function to octave-signal [octave forge] (signal) statelevels: new function
    2016-12-30 elca Attached File- Added statelevels.m, #39332
    2016-12-28 None Attached File- Added statelevels.patch, #39326

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code