Main Content

settings

Access the SettingsGroup root object

Description

example

s = settings returns the root SettingsGroup object in the settings hierarchical tree. Use the returned object to access and modify settings.

For more information about settings, see Access and Modify Settings. For documentation on individual settings, go to System Commands and select a link in the Settings category.

Examples

collapse all

Get and set the value for the maximum column width for comments in MATLAB®.

Get the root SettingsGroup object and access the value for the maximum column width for comments in MATLAB.

s = settings
s.matlab.editor.language.matlab.comments.MaxWidth
ans = 

 Setting 'matlab.editor.language.matlab.comments.MaxWidth' with properties.

       ActiveValue: 75
    TemporaryValue: <no value>
     PersonalValue: <no value>
      FactoryValue: 75

Set the temporary value for the maximum column width for comments in MATLAB. The temporary value is available only for the current MATLAB session and is cleared at the end of the session. For more information about the different types of settings values, see Access and Modify Settings.

s.matlab.editor.language.matlab.comments.MaxWidth.TemporaryValue = 80
s.matlab.editor.language.matlab.comments.MaxWidth
ans = 

 Setting 'matlab.editor.language.matlab.comments.MaxWidth' with properties.

       ActiveValue: 80
    TemporaryValue: 80
     PersonalValue: <no value>
      FactoryValue: 75
Introduced in R2018a