| Contents | Index |

| On this page… |
|---|
Configure options for setting the default package that will be used in the Model Explorer, Data Object Wizard and Signal Properties. Configure options for using Simulink.saveVars and the Model Explorer to export variables to MATLAB scripts.
Use the drop-down list to set the default package that will be used in the Model Explorer, Data Object Wizard and Signal Properties.
Use the text boxes to specify new default values to be used when exporting variables to MATLAB scripts:
Maximum elements in an array
Maximum levels of nesting
Dimensions for 2–D slice, if you want to use multidimensional array formatting
Maximum characters per line
Close the window to apply your changes.
Click Apply to apply your changes and keep the window open.
Your settings affect the behavior of the Simulink.saveVars function and the Model Explorer Export and Export Selected context menu items.
Set the default package that will be used in the Model Explorer, Data Object Wizard and Signal Properties.
Default: Simulink
Click Refresh to load all packages that are on the MATLAB path.
| Parameter: DefaultDataPackage |
| Type: string |
| Value: any valid value |
| Default: Simulink |
Limits the number of elements saved to a MATLAB script file for an array.
Default: 1000
The value must be an integer between 0 and 10000. For a character array, the upper limit is set to twice the value that you specify. If an array is larger than what you specify, then the whole array appears in the MAT-file rather than in the MATLAB script file, generating a warning.
| Parameter: SaveVarsPreferences |
| Field: MaxNumberElements |
| Type: integer |
| Value: any valid value |
| Default: 1000 |
Limits the number of levels of hierarchy saved to a MATLAB script file for an array.
Default: 20
The value must be an integer between 0 and 200. If a structure or cell array is deeper than what you specify, then the whole entity appears in the MAT-file rather than in the MATLAB script file, generating a warning.
| Parameter: SaveVarsPreferences |
| Field: MaxNumberLevels |
| Type: integer |
| Value: any valid value |
| Default: 20 |
Specify whether 2–D slice should be enabled for multidimensional array formatting.
Default: Off
Use 2–D slice to represent arrays of char, logic, or numeric data.
Do not use 2–D slice to represent arrays of char, logic, or numeric data.
| Parameter: SaveVarsPreferences |
| Field: Using2dSlice |
| Type: boolean |
| Value: 0 or 1 |
| Default: 0 |
Sets two dimensions for 2-D slices that represent n-D (where n is greater than 2) arrays of char, logic, or numeric data.
Default: [1 2]
The two integers must be positive.
The two integers must be less than or equal to the number of dimensions of the n-D array.
The second integer must be greater than the first.
| Parameter: SaveVarsPreferences |
| Field: DimensionsFor2dSlice |
| Type: integer array |
| Value: any valid value |
| Default: [1 2] |
Sets the text wrap width in the MATLAB script file
Default: 76
The value must be an integer between 32 and 256.
| Parameter: SaveVarsPreferences |
| Field: TextWidth |
| Type: integer |
| Value: any valid value |
| Default: 76 |
![]() | Simulink Preferences Window: Font Defaults for New Models Pane | Simulink Preferences Window: Configuration Defaults Pane | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |