The specified format applies only to the current session. The format function affects only how numbers are displayed, not how MATLAB computes or saves them. Use the format function to control the output format of the numeric values displayed in the Command Window. MATLAB performs all computations in double precision.
Select Preferences from the File menu in the MATLAB desktop and use Command Window preferences. Format (MATLAB Functions) MATLAB Function ReferenceĪs an alternative to format, use preferences.