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


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

Submitted by:  Julien Bect <jbect>
Submitted on:  Tue 16 May 2017 11:36:04 AM UTC  
Category: InterpreterSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: Works For MeAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.2.1Operating System: Any

Add a New Comment(Rich Markup)

You are not logged in

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


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>
Project 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>
Project Administrator
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

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>
Project Administrator
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:

and this one works in Matlab but not in Octave:

Julien Bect <jbect>


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by jbect (Submitted the item)

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

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 16 May 2017 02:44:24 PM UTCmtmillerSeverity3 - Normal=>2 - Minor
      StatusNone=>Works For Me

    Back to the top

    Powered by Savane 3.1-cleanup1