Tue 03 Jan 2017 04:49:22 PM UTC, original submission:
There are a number of differences in the display of variables between Matlab and Octave related to the compact/loose option to format.
The first, which I don't think we should change, is the the universal presence of a newline after the name of the variable in Matlab. Under Octave, the interpreter makes a decision about how large the display of the variable will be and if it is short, it puts it all on one line. I like that.
For instructional purposes, here are the documented Matlab display of the same variable under compact/loose
and
Under Octave with either format
The question is how to display something more complicated, like a matrix, under the two different formats. This is the result under 4.2.0
The difference is a newline before and after the matrix. However, there is no newline before the name of the variable "x =" as there is in Matlab under format loose to help separate the interpreter command from the display. Maybe that is worth changing?
A second possible change is that the newline is always inserted after the matrix object, when for cells it should be after the cell braces which mark the start and end of the object.
An example is
Again, just a question, but maybe it would make more sense to remove the newline before the final '}' and place it after the '}' so there was some space before the start of the next interpreter command prompt. Someone could also check under Matlab and see how it treats these examples.
|