MATLAB: Format output at Command window and Workspace inconsistent

formatoutput

format shortEng;
a=12345.6789;
Command window output is:
12.3457e+003
But in Workspace a is:
1.2346e+04
Why are the output format different??

Best Answer

They are not controlled by the same settings, so there is no reason why they have to be the same. It is possible that some features, such as the number of exponent digits, cannot be selected.
For the workspace viewer:
For the command window: