bugGNU Octave - Bugs: bug #58116, Feature Request: missing option...

 
 

bug #58116: Feature Request: missing option "all" for several functions - sum, mean, and others

Submitted by:  Nicholas Jankowski <nrjank>
Submitted on:  Sat 04 Apr 2020 10:58:00 PM UTC  
 
Category:  Octave Function Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Nicholas Jankowski Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Wed 03 Nov 2021 04:01:04 AM UTC, comment #5: 

note that the latest patch submitted to patch # 10103 adds vector and "all" dim options to std and var

Nicholas Jankowski <nrjank>
Project Member
Tue 15 Dec 2020 01:13:31 AM UTC, comment #4: 

so what is the equivalent in the compiled functions?

Nicholas Jankowski <nrjank>
Project Member
Sat 04 Apr 2020 11:56:09 PM UTC, comment #3: 

Yep. no idea what the fast C++ equivalent is, since I only play in m-space.

from that list:

m-files are:
bounds, mean, median, mode, std, var

cc files are:
all, any, max, min, prod

Nicholas Jankowski <nrjank>
Project Member
Sat 04 Apr 2020 11:28:28 PM UTC, comment #2: 

Changed the severity to "Minor" since there is an easy workaround that is supported by both Matlab and Octave.

Rik <rik5>
Project Administrator
Sat 04 Apr 2020 11:27:15 PM UTC, comment #1: 

Changed the release to "dev" since this is new development that will need to take place on that branch.

Agree, this seems like a fairly easy feature to implement.

1) Check dim argument to see if it is text (ischar())
2) Check that argument == "all" (strcmp ())
3) Call all(A(:)), or the equivalent in C++

Rik <rik5>
Project Administrator
Sat 04 Apr 2020 10:58:00 PM UTC, original submission:  

in v2018b, Matlab added the 'all' option for a number of functions. 

This was mentioned related to another missing option in: https://savannah.gnu.org/bugs/?func=detailitem&item_id=58089#comment1

which states it applies to "all, any, bounds, max, min, mean, median, mode, prod, std, and var".

This was noticed on the mailing list regarding the sum function when a new user tried to port over some code.

while bug #58089 was about a the option where the functions take a vector dimensions for multiple summation, the "all" function should be fairly trivial to implement as:

if "all" --> A = A(:), continue sum operation

At first glance at the function list it looks like this approach should apply to them all.

Nicholas Jankowski <nrjank>
Project Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nrjank (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-04-04 rik5 Severity3 - Normal => 2 - Minor
    2020-04-04 rik5 Item GroupMatlab Compatibility => Feature Request
        StatusNone => Confirmed
        Release5.2.0 => dev
        SummaryMatlab Compatibility: missing option "all" for several functions - sum, mean, and others => Feature Request: missing option "all" for several functions - sum, mean, and others

    Back to the top


    Powered by Savane 3.7