Main Content

matlab.commandwindow Settings

Command Window settings including text display settings

Since R2020b

You can change the appearance of the Command Window and its output using the matlab.commandwindow settings. Access matlab.commandwindow settings using the root SettingsGroup object returned by the settings function. For example, set the temporary value for line spacing in the Command Window to 'compact'.

s = settings;
s.matlab.commandwindow.DisplayLineSpacing.TemporaryValue = 'compact'

For more information about settings, see Access and Modify Settings.

matlab.commandwindow

Output display format, specified as one of these options.

Style

Result

Example

short (default)

Short, fixed-decimal format with 4 digits after the decimal point.

3.1416

long

Long, fixed-decimal format with 15 digits after the decimal point for double values, and 7 digits after the decimal point for single values.

3.141592653589793

shortE

Short scientific notation with 4 digits after the decimal point.

3.1416e+00

longE

Long scientific notation with 15 digits after the decimal point for double values, and 7 digits after the decimal point for single values.

3.141592653589793e+00

shortG

Short, fixed-decimal format or scientific notation, whichever is more compact, with a total of 5 digits.

3.1416

longG

Long, fixed-decimal format or scientific notation, whichever is more compact, with a total of 15 digits for double values, and 7 digits for single values.

3.14159265358979

shortEng

Short engineering notation (exponent is a multiple of 3) with 4 digits after the decimal point.

3.1416e+000

longEng

Long engineering notation (exponent is a multiple of 3) with 15 significant digits.

3.14159265358979e+000

+

Positive/Negative format with +, -, and blank characters displayed for positive, negative, and zero elements.

+

bank

Currency format with 2 digits after the decimal point.

3.14

hex

Hexadecimal representation of a binary double-precision number.

400921fb54442d18

rational

Ratio of small integers.

355/113

Example: s.matlab.commandwindow.NumericFormat.TemporaryValue = 'shortE'

Line spacing in output display, specified as 'loose' or 'compact'. Specify compact to suppress blank lines in Command Window output, and loose to display blank lines.

Example: s.matlab.commandwindow.DisplayLineSpacing.TemporaryValue = 'compact'

Use eighty columns display width, specified as 0 or 1. Set to 1 to limit the width of matrix output in the Command Window to eighty columns.

Example: s.matlab.commandwindow.UseEightyColumnDisplayWidth.TemporaryValue = 1

matlab.commandwindow.suggestions

Show suggestions automatically in MATLAB Online, specified as 1 or 0.

Set to 1 to show suggestions as you type in the Command Window in MATLAB Online. Set to 0 to show suggestions only when you press Ctrl+Space or the Tab key.

For more information about code suggestions and completions, see Check Syntax and Autocomplete Code as You Type.

Example: s.matlab.commandwindow.suggestions.ShowAutomatically.TemporaryValue = 0

Show suggestions on tab in MATLAB Online, specified as 1 or 0.

Set to 1 to show suggestions when you press the Tab key in the Command Window in MATLAB Online. Set to 0 to show suggestions only when you press Ctrl+Space.

For more information about code suggestions and completions, see Check Syntax and Autocomplete Code as You Type.

Example: s.matlab.commandwindow.suggestions.ShowOnTab.TemporaryValue = 0

Accept suggestions on right arrow in MATLAB Online, specified as 1 or 0.

Set to 1 to accept suggestions using the Right Arrow key in the Command Window in MATLAB Online. Set to 0 to accept suggestions only using the Tab and Enter keys.

For more information about code suggestions and completions, see Check Syntax and Autocomplete Code as You Type.

Example: s.matlab.commandwindow.suggestions.AcceptOnRightArrow.TemporaryValue = 0

Version History

Introduced in R2020b