Main Content

sfpref

View and adjust user preferences in Stateflow charts

Description

actionLanguage = sfpref('ActionLanguage') returns the default action language used by Stateflow® charts.

example

sfpref('ActionLanguage',newLanguage) modifies the default action language. See Change the Default Action Language.

correctionSetting = sfpref('EnableLabelAutoCorrectionForMAL') returns if Stateflow automatically corrects common C constructs in charts that use MATLAB® as the action language.

example

sfpref('EnableLabelAutoCorrectionForMAL',newSetting) enables or disables automatic correction of common C constructs in Stateflow charts that use MATLAB as the action language. See Auto Correction When Using MATLAB as the Action Language.

directory = sfpref('PatternWizardCustomDir') returns the directory for custom patterns created using the Stateflow Pattern Wizard.

example

sfpref('PatternWizardCustomDir',newDirectory) modifies the directory for custom patterns created using the Stateflow Pattern Wizard. See Save Custom Flow Chart Patterns.

Examples

collapse all

sfpref('ActionLanguage','C')

Change the action language being used in new Stateflow charts to C.

sfpref('EnableLabelAutoCorrectionForMAL',1)

Enable automatic correction of common C constructs in new Stateflow charts when using MATLAB as the action language.

sfpref('PatternWizardCustomDir','C:\')

Assign the directory for custom patterns created using the Stateflow Pattern Wizard to C:\.

Input Arguments

collapse all

Action language used by Stateflow, specified as 'MATLAB' or 'C'.

Data Types: char

Option for Stateflow automatic C construct correction while using MATLAB as the action language, specified as 1 or 0.

Note

When you change the action language of a chart from C to MATLAB, the newSetting value does not affect syntax conversion.

Data Types: double

Directory for Stateflow custom patterns created by the Pattern Wizard, specified as a character array.

Data Types: char

Introduced before R2006a