bugGNU Octave - Bugs: bug #63107, Functions "sum",...


bug #63107: Functions "sum", "min", "max" doesn't accepting 'all' parameter

Submitter:  Alexander L <alexanderl>
Submitted:  Mon 26 Sep 2022 12:45:54 PM UTC
Category:  Octave Function Severity:  1 - Wish
Priority:  5 - Normal Item Group:  Feature Request
Status:  Duplicate Assigned to:  None
Originator Name:  Alexander L Open/Closed:  * Closed
Release:  * 7.2.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Sat 11 Feb 2023 03:47:31 PM UTC, comment #5: 

comment #4:

Ahh, I originally misunderstood your phrase in your comment #1 that "in the meantime, the B = sum(A, "all") behavior can be emulated in Octave and pre 2018 Matlab using B = sum(A(:))". I thought you meant that I couldn't replace first with second in Matlab after the 2018+ version. But you really mean that before Matlab 2018 I can't use these syntax 'sum(A, "all")'.

No, never mind, please...

Alexander L <alexanderl>
Sun 29 Jan 2023 11:48:45 PM UTC, comment #4: 


Curious what you mean by sum(A(:)) not working in MATLAB 2020?  Unless im missing something that's long been a cross- and backward-compatible notation in both programs.

Nicholas Jankowski <nrjank>
Project Member
Sun 29 Jan 2023 09:51:18 PM UTC, comment #3: 

comment #2:

> just realized that in comment #! i meant to point to the short list in bug #58116 comment #3.

Thank you for your links, Nicholas! Unfortunately, I couldn't apply this solution with 'B = sum(A(:))' because I and my colleagues use Matlab 2020, although it could be fixed by using appropriate number of sums, e.g.: B = sum(sum(A)).

P.S. At this point I concluded that we cannot use Octave yet, not even because of the lack of support for summation on all axes (this can be easily fixed), but because it does not have important functions for our program, namely the 'yyaxis' (bug #63108) (in short, function that plot graphics with 2 independent y axes)

P.P.S. I am a C++ programmer and could probably add support for 'all' parameter to some of listed in bug #58116 functions, but unfortunately I don't have time to do that yet.

Alexander L <alexanderl>
Tue 24 Jan 2023 04:35:24 PM UTC, comment #2: 

just realized that in comment #! i meant to point to the short list in bug #58116 comment #3.

Nicholas Jankowski <nrjank>
Project Member
Mon 26 Sep 2022 01:24:29 PM UTC, comment #1: 

there have been a few different reports about the changes made to those functions in 2018. in addition to 'all' (bug #58116), there is the ability to take vector dimensions (bug #58089), and the nanflag option (bug #50571).

regarding other functions, i made a short list bug #58114 comment #3, and I think the change overlaps with the functions that accept nanflag, which has a more extensive list in bug #50571.

closing as a duplicate, further discussion can be added to the existing reports.  in the meantime, the B = sum(A, "all") behavior can be emulated in Octave and pre 2018 Matlab using B = sum(A(:))

Nicholas Jankowski <nrjank>
Project Member
Mon 26 Sep 2022 12:45:54 PM UTC, original submission:  

Since Matlab R2018b, Mathworks introduced parameter 'all', that can be passed to "sum", "min" and "max" functions for doing these operations on all dimensions of data passed to them.

As seems in documentation of Octave, it is not supported (https://octave.sourceforge.io/octave/function/sum.html), (https://octave.sourceforge.io/octave/function/min.html), as well as I manually tested this feature in Octave and it not work.

Dear developers, can you make passing 'all' parameter to these functions possible in Octave?

I'm curious, if there are some other functions, that also could accept this 'all' parameter, but in Matlab R2018b Release notes not mentioned about this feature at all, so I can't figure full list of these functions. (https://www.mathworks.com/help/matlab/release-notes.html?rntext=&startrelease=R2018b&endrelease=R2018b&groupby=release&sortby=descending&searchHighlight=)

Alexander L <alexanderl>


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

Attach Files:

No files currently attached


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by alexanderl (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 project members can vote.





    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-09-26 jwe Severity3 - Normal 1 - Wish
        Item GroupMatlab Compatibility Feature Request
    2022-09-26 nrjank StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #58116

    Back to the top

    Powered by Savane 3.11