Unfortunately, this behavior seems to have no preference. There is (as always) a bit of a hacker workaround.
When you omit a semicolon from a string, it is not called disp , but rather display . R2016b apparently modified the display method for the cell data type to display type information along with the values ββthemselves.
Fortunately, we can overload this display method with something that is a bit like the display previous releases.
We can create the @cell folder (anywhere on our path) and put the file named display.m inside.
@cell/display.m
function display(obj) % Overloaded display function for grumpy old men if strcmpi(get(0, 'FormatSpacing'), 'loose') fprintf('\n%s =\n\n', inputname(1)) else fprintf('%s =\n', inputname(1)) end disp(obj); end
Now, whenever a cell array is displayed due to the lack of a finite semi-colony, it will not include type information.
>> c = {'a', 'b'} c = 'a' 'b'
Unfortunately, there are other data types (e.g. logical ) that also display type information, so you have to overload the display method for each of these classes.
source share