Search code examples
matlabnumber-formatting

How can I change MATLAB's default formatting?


Opening a new MATLAB R2022a session, I notice the default formatting set to shortG, where I expected it to be just short. How can I change the default back to short?

>> fmt = format

fmt = 

  DisplayFormatOptions with properties:

    NumericFormat: "shortG"
      LineSpacing: "loose"

Solution

  • You can change that in PreferencesMATLABCommand WindowNumeric format:

    enter image description here