Modify Workspace and Variables Settings - MATLAB & Simulink (original) (raw)
Workspace Settings
You can customize the saving of variables as MATLABĀ® script files, the display of statistical calculations in the Workspace panel, and the MATLAB array size limit by using Workspace settings.
On the Home tab, in the Environment section, click Settings. Select > , and then adjust these options.
Setting | Usage |
---|---|
Thresholds for saving variables to MATLAB script | In the Maximum array size box, enter the maximum number of array elements to save in a MATLAB script. Arrays exceeding this size are saved in a companion MAT file. |
In the Maximum struct/object nesting levels field, enter the maximum number of structure or object nesting levels to save in a MATLAB script. Structures or objects exceeding this depth are saved in a companion MAT file. | |
Multidimensional array formatting | These settings specify how multidimensional arrays are formatted when saved to a MATLAB script.Select Row vector with reshape for compactness and efficiency.Select As 2-D pages to maintain array representation and readability. Then, in theArray dimensions to appear in 2-D pages boxes, specify the dimensions of a 2-D slice. The dimensions must be positive integers less than or equal to the array dimensions, and the second integer must be greater than the first. |
File formatting | In the Maximum characters per line box, enter the maximum number of characters to allow in the MATLAB script before wrapping the text when you save variables to a MATLAB script. |
Statistical calculations | n element and smaller arrays show statistics specifies the maximum number of array elements for calculating statistics in the Workspace panel. You can improve the performance of the Workspace panel by omitting statistics for large arrays. |
Select Ignore NaNs when calculating statistics for the Workspace panel to ignore missing values when computing statistics to display. | |
MATLAB array size limit | By default, MATLAB can use up to 100% of the size of RAM (not including virtual memory) of your computer to allocate memory for each MATLAB array. You can move the slider to adjust the percentage of RAM.To allow MATLAB to use both RAM and virtual memory when creating an array, clear the Limit the maximum array size to a percentage of RAM check box. If MATLAB attempts to allocate memory that exceeds the resources available on the computer, your system might become unresponsive. |
Variables Settings
You can customize the default array format, cursor movement, placement of missing values for sorting, code generation, and the display of sparklines and summary statistics in the Variables editor by using the Variables settings.
Note
You can also use the Variable andView tabs for the Variables editor to control some of these settings.
On the Home tab, in the Environment section, click Settings. Select > , and then adjust these options.
Setting | Usage |
---|---|
Format | From the Default array format list, select a default display format for numeric values in the Variables editor. This setting does not affect how numbers display in the Command Window or how MATLAB computes or saves numbers. For information on formatting options, see the format function. |
Editing | After you make changes to an element in the Variables editor, you can press Enter to save your changes and move to the next element. Clear Move selection after Enter to save your changes and keep the current element selected when you edit an element and pressEnter. |
By default, the focus moves down to the next element. To specify a different direction to move the focus, select a direction from the Direction list. | |
Sorting | From the Placement of missing values list, select the placement of missing values, such asNaN and NaT, when you sort data. Alternatively, specify the MissingPlacement name-value argument when you sort data using the sort or sortrows functions. |
Code Generation | By default, the Command Window displays generated code when you perform operations in the Variables editor. Clear the Show MATLAB code for operations check box to hide this code. |
Tabular Variable Display | Select the Display sparklines check box to display sparklines in the variable headers for table and timetable data in the Variables editor. |
Select the Display summary statistics check box to display summary statistics in the variable headers for table and timetable data in the Variables editor. | |
Enter a value in the Maximum number of text elements to display sparklines or summary statistics box to omit sparklines and summary statistics for large table and timetable data in the Variables editor. |