bugGNU Octave - Bugs: bug #51035, Matlab/Octave incompatiblity for...


bug #51035: Matlab/Octave incompatiblity for querying compact/loose display status

Submitter:  Julien Bect <jbect>
Submitted:  Tue 16 May 2017 11:36:04 AM UTC
Category:  Interpreter Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 4.2.1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Tue 16 May 2017 07:58:09 PM UTC, comment #5: 

It's easy enough to reintroduce these root properties for private builds, I've done that in my own builds to be able to use them at work where I hit this compatibility issue.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 16 May 2017 04:58:25 PM UTC, comment #4: 

Well, I think that intentionally breaking something that was working compatibly is a bad decision.

But I don't have any new argument to re-open the case.

Developers who want, like me, to support a wide range of Octave and Matlab versions, will now have for a long time (until 4.2.x can be considered as obsolete!) to either ignore the compact/loose setting or deal with two different syntaxes.

Reverting the change now won't solve the problem, unless I decide not to support Octave 4.2.x...

Julien Bect <jbect>
Tue 16 May 2017 04:42:13 PM UTC, comment #3: 

I concur, the "Format" and "FormatSpacing" properties are still documented on the official help for the format command under the section "Get Current Format".

It is also worth noting that these two properties are not documented as part of the Root object public property list at https://mathworks.com/help/matlab/ref/root-properties.html.

IIRC one of the maintainers expressed an opinion that it makes no sense for these properties, which are part of the format command, to coexist along with graphics properties in the Root object, all of which have to do with figures and graphical manipulation.

The Diary and DiaryFile properties were removed from Octave at the same time, and it seems to me that those are similar. They are settings that have no other way of being queried, but Matlab stuffs them in the Root object property list because it seems to have no other place to put them. Octave's diary command has output arguments similar to the syntax of the format command to query these properties.

If you think it's important enough for Matlab compatibility that these legacy Root properties be reintroduced in Octave 4.4, you could start a discussion on the maintainers list. As it is the status of this bug will probably remain "yes, it's a known intentional incompatibility and will remain that way".

Mike Miller <mtmiller>
Group Member
Tue 16 May 2017 04:23:48 PM UTC, comment #2: 

Oooops, I missed bug reports #49951 and #46034, which were indeed about the same issue...

Apologies for not searching properly for prior bug reports.  Feel free to mark this ticket as duplicate.


The situation is indeed unclear in Matlab's documentation, since

1) on the one hand, the 'FormatSpacing' property has been officially removed from the root properties in R2014b according to the release notes



2) The syntax

fmt = get (0, 'FormatSpacing')

is still officially documented as the proper way to get this information


Judging by your comment on bug report #46000 (2015/09/22) this was already mentioned on the exact same page back then.


To summarize:

The 'FormatSpacing' root property seems to have always been de facto (if not publicly) available in Matlab, and the syntax get(0,'FormatSpacing') appears to never have been removed from Matlab's doc.

The syntax get(0,'FormatSpacing') was working in Octave as well, up to release 4.0.3.

I have to confess, then, that I really don't understand the decision to remove this syntax from Octave 4.2.1.

Julien Bect <jbect>
Tue 16 May 2017 02:44:24 PM UTC, comment #1: 

This has been discussed and changed a few times now. The root properties 'Format" and "FormatSpacing" were intentionally removed from Octave in the 4.2 release. They are undocumented Matlab and the maintainers decided not to support them anymore. The `[a,b] = format` syntax was introduced to make up for the fact that there is no other way to query these properties in either Octave or Matlab.

Yes, there is no way to query this information the same in Octave and Matlab, and this is arguably not a bug.

Mike Miller <mtmiller>
Group Member
Tue 16 May 2017 11:36:04 AM UTC, original submission:  

It does not seem possible to use the same command in Octave and Matlab to query the compact/loose status of display.

The following works in Octave but not in Matlab:

[~, fmt] = format ()

and this one works in Matlab but not in Octave:

fmt = get (0, 'FormatSpacing')

Julien Bect <jbect>


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

Attach Files:

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 jbect (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 group members can vote.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-24 mtmiller Carbon-CopyRemoved 80942 -
    2017-05-16 mtmiller Severity3 - Normal 2 - Minor
        StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-c373.
    Corresponding source code